Skip to content

Commit

Permalink
Bug 1822462 - Use TARGET_C{,XX}FLAGS consistently between platforms. …
Browse files Browse the repository at this point in the history
…r=firefox-build-system-reviewers,andi

In some cases, TARGET_CC/TARGET_CXX are ignored by build scripts.
For consistency, also use TARGET_CFLAGS/TARGET_CXXFLAGS for Linux.

Differential Revision: https://phabricator.services.mozilla.com/D172646
  • Loading branch information
glandium committed Mar 15, 2023
1 parent f800c98 commit f16ddf3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions taskcluster/scripts/misc/build-rust-based-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ x86_64-unknown-linux-gnu)
export RUSTFLAGS="-Clinker=$MOZ_FETCHES_DIR/clang/bin/clang++ -C link-arg=--sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu -C link-arg=-fuse-ld=lld"
export CC=$MOZ_FETCHES_DIR/clang/bin/clang
export CXX=$MOZ_FETCHES_DIR/clang/bin/clang++
export CFLAGS="--sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu"
export CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 --sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu"
export TARGET_CFLAGS="--sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu"
export TARGET_CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 --sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu"
;;
*-apple-darwin)
# Cross-compiling for Mac on Linux.
Expand All @@ -31,8 +31,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/MacOSX13.0.sdk"
export TARGET_CXX="$CXX -isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk -stdlib=libc++"
export TARGET_CFLAGS="-isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk"
export TARGET_CXXFLAGS="-isysroot $MOZ_FETCHES_DIR/MacOSX13.0.sdk -stdlib=libc++"
;;
*-pc-windows-msvc)
# Cross-compiling for Windows on Linux.
Expand Down

0 comments on commit f16ddf3

Please sign in to comment.