Bug 1812215 - Build mac toolchains with the macOS 13 SDK. r=firefox-build-system-reviewers,andi

Differential Revision: https://phabricator.services.mozilla.com/D167758
This commit is contained in:
Mike Hommey 2023-01-27 09:12:51 +00:00
Родитель 2c62c82447
Коммит a830786a12
7 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -45,7 +45,6 @@ macosx64-sdk-11.3:
- b075d3d2f3b066607209a5bbf7cf727a40b98fe65629c5b6abc17f156897af4a
- Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk
toolchain-artifact: project/gecko/mac-sdk/MacOSX11.3.sdk.tar.zst
toolchain-alias: macosx64-sdk-toolchain
resources:
- python/mozbuild/mozpack/macpkg.py
- taskcluster/scripts/misc/unpack-sdk.py
@ -62,7 +61,9 @@ macosx64-sdk-13.0:
- 06f4a045854c456a553a5ee6acf678fbe26c06296fc68054ae918c206134aa20
- Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk
toolchain-artifact: project/gecko/mac-sdk/MacOSX13.0.sdk.tar.zst
toolchain-alias: macosx64-sdk
toolchain-alias:
- macosx64-sdk
- macosx64-sdk-toolchain
resources:
- python/mozbuild/mozpack/macpkg.py
- taskcluster/scripts/misc/unpack-sdk.py

Просмотреть файл

@ -6,7 +6,7 @@ set -e -v
WORKSPACE=$HOME/workspace
CROSS_CCTOOLS_PATH=$MOZ_FETCHES_DIR/cctools
CROSS_SYSROOT=$MOZ_FETCHES_DIR/MacOSX11.3.sdk
CROSS_SYSROOT=$MOZ_FETCHES_DIR/MacOSX13.0.sdk
export MACOSX_DEPLOYMENT_TARGET=10.12
export CC=$MOZ_FETCHES_DIR/clang/bin/clang

Просмотреть файл

@ -63,11 +63,11 @@ case "$target" in
-DCMAKE_LIPO=$MOZ_FETCHES_DIR/clang/bin/llvm-lipo
-DCMAKE_SYSTEM_NAME=Darwin
-DCMAKE_SYSTEM_VERSION=$MACOSX_DEPLOYMENT_TARGET
-DCMAKE_OSX_SYSROOT=$MOZ_FETCHES_DIR/MacOSX11.3.sdk
-DCMAKE_OSX_SYSROOT=$MOZ_FETCHES_DIR/MacOSX13.0.sdk
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
-DDARWIN_osx_ARCHS=$arch
-DDARWIN_osx_SYSROOT=$MOZ_FETCHES_DIR/MacOSX11.3.sdk
-DDARWIN_osx_SYSROOT=$MOZ_FETCHES_DIR/MacOSX13.0.sdk
-DDARWIN_macosx_OVERRIDE_SDK_VERSION=11.0
-DDARWIN_osx_BUILTIN_ARCHS=$arch
-DLLVM_DEFAULT_TARGET_TRIPLE=$target

Просмотреть файл

@ -37,14 +37,14 @@ case "$1" in
export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/clang/lib"
export MACOSX_DEPLOYMENT_TARGET=10.12
./configure CC="clang --target=x86_64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk" --host=x86_64-apple-darwin
./configure CC="clang --target=x86_64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk" --host=x86_64-apple-darwin
EXE=
;;
macosx64-aarch64)
export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/clang/lib"
export MACOSX_DEPLOYMENT_TARGET=11.0
./configure CC="clang --target=aarch64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk" --host=aarch64-apple-darwin
./configure CC="clang --target=aarch64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk" --host=aarch64-apple-darwin
EXE=
;;
*)

Просмотреть файл

@ -15,14 +15,14 @@ x86_64-apple-darwin)
export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/clang/lib"
export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
export MACOSX_DEPLOYMENT_TARGET=10.12
./configure --disable-shared CC="clang --target=x86_64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk" --host=x86_64-apple-darwin
./configure --disable-shared CC="clang --target=x86_64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk" --host=x86_64-apple-darwin
EXE=
;;
aarch64-apple-darwin)
export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/clang/lib"
export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
export MACOSX_DEPLOYMENT_TARGET=11.0
./configure --disable-shared CC="clang --target=aarch64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk" --host=aarch64-apple-darwin
./configure --disable-shared CC="clang --target=aarch64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk" --host=aarch64-apple-darwin
EXE=
;;
x86_64-pc-windows-gnu)

Просмотреть файл

@ -32,8 +32,8 @@ x86_64-unknown-linux-gnu)
fi
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
export CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
export TARGET_CC="$CC -isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk"
export TARGET_CXX="$CXX -isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk -stdlib=libc++"
export TARGET_CC="$CC -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk"
export TARGET_CXX="$CXX -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk -stdlib=libc++"
;;
*-pc-windows-msvc)
# Cross-compiling for Windows on Linux.

Просмотреть файл

@ -5,5 +5,5 @@ exec $MOZ_FETCHES_DIR/clang/bin/clang -v \
-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET:-10.12} \
-target $TARGET \
-B $MOZ_FETCHES_DIR/cctools/bin \
-isysroot $MOZ_FETCHES_DIR/MacOSX11.3.sdk \
-isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk \
"$@"