Use the cross-compile tools hosted on tooltool (#1202)
This commit is contained in:
Родитель
ba62704cf6
Коммит
cb4468ab29
|
@ -319,12 +319,12 @@ def linux_cross_compile_build_task(name):
|
|||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_OPENSSL_DIR=/build/repo/libs/desktop/darwin/openssl
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CC=/tmp/clang/bin/clang
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_TOOLCHAIN_PREFIX=/tmp/cctools/bin
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_AR=/tmp/cctools/bin/x86_64-apple-darwin11-ar
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RANLIB=/tmp/cctools/bin/x86_64-apple-darwin11-ranlib
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_AR=/tmp/cctools/bin/x86_64-darwin11-ar
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RANLIB=/tmp/cctools/bin/x86_64-darwin11-ranlib
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_LD_LIBRARY_PATH=/tmp/clang/lib
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RUSTFLAGS="-C linker=/tmp/clang/bin/clang -C link-arg=-B -C link-arg=/tmp/cctools/bin -C link-arg=-target -C link-arg=x86_64-apple-darwin11 -C link-arg=-isysroot -C link-arg=/tmp/MacOSX10.11.sdk -C link-arg=-Wl,-syslibroot,/tmp/MacOSX10.11.sdk -C link-arg=-Wl,-dead_strip"
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_RUSTFLAGS="-C linker=/tmp/clang/bin/clang -C link-arg=-B -C link-arg=/tmp/cctools/bin -C link-arg=-target -C link-arg=x86_64-darwin11 -C link-arg=-isysroot -C link-arg=/tmp/MacOSX10.11.sdk -C link-arg=-Wl,-syslibroot,/tmp/MacOSX10.11.sdk -C link-arg=-Wl,-dead_strip"
|
||||
# For ring's use of `cc`.
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CFLAGS_x86_64_apple_darwin="-B /tmp/cctools/bin -target x86_64-apple-darwin11 -isysroot /tmp/MacOSX10.11.sdk -Wl,-syslibroot,/tmp/MacOSX10.11.sdk -Wl,-dead_strip"
|
||||
export ORG_GRADLE_PROJECT_RUST_ANDROID_GRADLE_TARGET_X86_64_APPLE_DARWIN_CFLAGS_x86_64_apple_darwin="-B /tmp/cctools/bin -target x86_64-darwin11 -isysroot /tmp/MacOSX10.11.sdk -Wl,-syslibroot,/tmp/MacOSX10.11.sdk -Wl,-dead_strip"
|
||||
|
||||
apt-get install --quiet --yes --no-install-recommends mingw-w64
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
|
|
|
@ -55,14 +55,14 @@ if [[ "${CROSS_COMPILE_TARGET}" =~ "darwin" ]]; then
|
|||
export CC=/tmp/clang/bin/clang
|
||||
|
||||
export TOOLCHAIN_PREFIX=/tmp/cctools/bin
|
||||
export AR=/tmp/cctools/bin/x86_64-apple-darwin11-ar
|
||||
export RANLIB=/tmp/cctools/bin/x86_64-apple-darwin11-ranlib
|
||||
export AR=/tmp/cctools/bin/x86_64-darwin11-ar
|
||||
export RANLIB=/tmp/cctools/bin/x86_64-darwin11-ranlib
|
||||
|
||||
LD_LIBRARY_PATH=/tmp/clang/lib ./Configure darwin64-x86_64-cc \
|
||||
no-asm shared \
|
||||
-march=x86-64 \
|
||||
'-B /tmp/cctools/bin' \
|
||||
'-target x86_64-apple-darwin11' \
|
||||
'-target x86_64-darwin11' \
|
||||
'-isysroot /tmp/MacOSX10.11.sdk' \
|
||||
'-Wl,-syslibroot,/tmp/MacOSX10.11.sdk' \
|
||||
'-Wl,-dead_strip' \
|
||||
|
|
|
@ -93,20 +93,20 @@ make clean || true
|
|||
if [[ "${CROSS_COMPILE_TARGET}" =~ "darwin" ]]; then
|
||||
export CC=/tmp/clang/bin/clang
|
||||
|
||||
export AR=/tmp/cctools/bin/x86_64-apple-darwin11-ar
|
||||
export RANLIB=/tmp/cctools/bin/x86_64-apple-darwin11-ranlib
|
||||
export STRIP=/tmp/cctools/bin/x86_64-apple-darwin11-strip
|
||||
export LIBTOOL=/tmp/cctools/bin/x86_64-apple-darwin11-libtool
|
||||
export NM=/tmp/cctools/bin/x86_64-apple-darwin11-nm
|
||||
export LD=/tmp/cctools/bin/x86_64-apple-darwin11-ld
|
||||
export AR=/tmp/cctools/bin/x86_64-darwin11-ar
|
||||
export RANLIB=/tmp/cctools/bin/x86_64-darwin11-ranlib
|
||||
export STRIP=/tmp/cctools/bin/x86_64-darwin11-strip
|
||||
export LIBTOOL=/tmp/cctools/bin/x86_64-darwin11-libtool
|
||||
export NM=/tmp/cctools/bin/x86_64-darwin11-nm
|
||||
export LD=/tmp/cctools/bin/x86_64-darwin11-ld
|
||||
|
||||
export CFLAGS='-B /tmp/cctools/bin -target x86_64-apple-darwin11 -mlinker-version=137 -isysroot /tmp/MacOSX10.11.sdk -I/tmp/MacOSX10.11.sdk/usr/include -iframework /tmp/MacOSX10.11.sdk/System/Library/Frameworks'
|
||||
export CFLAGS='-B /tmp/cctools/bin -target x86_64-darwin11 -mlinker-version=137 -isysroot /tmp/MacOSX10.11.sdk -I/tmp/MacOSX10.11.sdk/usr/include -iframework /tmp/MacOSX10.11.sdk/System/Library/Frameworks'
|
||||
export LDFLAGS='-B /tmp/cctools/bin -Wl,-syslibroot,/tmp/MacOSX10.11.sdk -Wl,-dead_strip'
|
||||
# This is crucial. Without this, libtool drops the `-target ...`
|
||||
# flags from the clang compiler linker driver invocation, resulting
|
||||
# in clang choosing a random system `ld` rather than the macOS
|
||||
# linker from the cctools port.
|
||||
export LTLINK_EXTRAS='-XCClinker -target -XCClinker x86_64-apple-darwin11 -XCClinker -B -XCClinker /tmp/cctools/bin'
|
||||
export LTLINK_EXTRAS='-XCClinker -target -XCClinker x86_64-darwin11 -XCClinker -B -XCClinker /tmp/cctools/bin'
|
||||
|
||||
# See https://searchfox.org/mozilla-central/rev/8848b9741fc4ee4e9bc3ae83ea0fc048da39979f/build/macosx/cross-mozconfig.common#12-13.
|
||||
export LD_LIBRARY_PATH=/tmp/clang/lib
|
||||
|
|
|
@ -1,23 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Install clang, a port of cctools, and the macOS SDK into /tmp. This
|
||||
# Install clang, a port of cctools, and the macOS SDK into /tmp. This
|
||||
# is all cribbed from mozilla-central; start at
|
||||
# https://searchfox.org/mozilla-central/rev/39cb1e96cf97713c444c5a0404d4f84627aee85d/build/macosx/cross-mozconfig.common.
|
||||
|
||||
set -euvx
|
||||
|
||||
MANIFEST="${PWD}/macos-cc-tools.manifest"
|
||||
|
||||
pushd /tmp
|
||||
|
||||
curl --location --retry 10 --retry-delay 10 -o cross-clang.manifest https://hg.mozilla.org/mozilla-central/raw-file/588208caeaf863f2207792eeb1bd97e6c8fceed4/browser/config/tooltool-manifests/macosx64/cross-clang.manifest
|
||||
|
||||
tooltool.py --manifest=cross-clang.manifest --url=http://taskcluster/tooltool.mozilla-releng.net/ fetch
|
||||
|
||||
# curl --location --retry 10 --retry-delay 10 -o cctools.tar.xz https://index.taskcluster.net/v1/task/gecko.cache.level-3.toolchains.v2.linux64-cctools-port.latest/artifacts/public/build/cctools.tar.xz
|
||||
curl --location --retry 10 --retry-delay 10 -o cctools.tar.xz https://queue.taskcluster.net/v1/task/T-2QILzUSN-fEkRUH9bYvg/artifacts/public%2Fbuild%2Fcctools.tar.xz
|
||||
tar xf cctools.tar.xz
|
||||
|
||||
# curl --location --retry 10 --retry-delay 10 -o clang.tar.xz https://index.taskcluster.net/v1/task/gecko.cache.level-3.toolchains.v2.linux64-clang-7.latest/artifacts/public/build/clang.tar.xz
|
||||
curl --location --retry 10 --retry-delay 10 -o clang.tar.xz https://queue.taskcluster.net/v1/task/a2942WbJRgObZFIDwRc_OQ/artifacts/public%2Fbuild%2Fclang.tar.xz
|
||||
tar xf clang.tar.xz
|
||||
tooltool.py \
|
||||
--url=http://taskcluster/tooltool.mozilla-releng.net/ \
|
||||
--manifest="${MANIFEST}" \
|
||||
fetch
|
||||
|
||||
popd
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{
|
||||
"size": 34094283,
|
||||
"visibility": "internal",
|
||||
"digest": "8811050fe375bcc566c8b85173d86b8a87aa2148edfed93023735c2de44b66a5a28cbaa1cfd396032447fd803e03f308ed941a200c0e2a1ad9fbe16b5606ee7c",
|
||||
"algorithm": "sha512",
|
||||
"unpack": true,
|
||||
"filename": "MacOSX10.11.sdk.tar.xz"
|
||||
},
|
||||
{
|
||||
"size": 1549588,
|
||||
"visibility": "public",
|
||||
"digest": "3653886e5ea471f6089e526c8ae63063a7e032872c051d85f91389e40baef887e7452c93f0386e23c72875853cb9c2f46f282eec8015c53c6ab4c24e964e8620",
|
||||
"algorithm": "sha512",
|
||||
"unpack": true,
|
||||
"filename": "cctools.tar.xz"
|
||||
},
|
||||
{
|
||||
"size": 160611724,
|
||||
"visibility": "public",
|
||||
"digest": "82d300433526a0a008214a2b704f8de63617751001126b62a91239ce0f002e6504200988f42e25fff273d7228daa4de835d6fe82ef7e6ff8a4f667d8636abb99",
|
||||
"algorithm": "sha512",
|
||||
"unpack": true,
|
||||
"filename": "clang.tar.xz"
|
||||
}
|
||||
]
|
Загрузка…
Ссылка в новой задаче