Bug 1424825: Don't use tooltool SDK for building host tools; r=me draft
authorTom Prince <mozilla@hocat.ca>
Tue, 12 Dec 2017 10:32:28 -0700
changeset 57242 d0fc1fc0241171f16fe2df91de1e4defebde123d
parent 57240 dca5f12cf6054a5fbf3e97f692a1542c1b21c72c
child 57243 a113de79111875c2cf5674fa2a249960ffb1edce
child 57244 d76e4856607aa77e6d7a8cd8b662aa3d323212a3
child 57245 c2fa0e8413454462e6fc518856f79c7c1cc96267
child 57246 8af1c60e5a5fbaa8afa4c8093ce82e6ad48e21f2
child 57247 5b4337c67a53562ea9adc1e8d9c841dc3562a696
push id5523
push usermozilla@hocat.ca
push dateTue, 12 Dec 2017 17:32:46 +0000
treeherdertry-comm-central@a113de791118 [default view] [failures only]
reviewersme
bugs1424825
Bug 1424825: Don't use tooltool SDK for building host tools; r=me
build/macosx/local-mozconfig.common
--- a/build/macosx/local-mozconfig.common
+++ b/build/macosx/local-mozconfig.common
@@ -28,26 +28,34 @@ if [ -d $TOOLTOOL_DIR/MacOSX10.11.sdk ];
     ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
     # Since we are manually providing an SDK, don't check for xcode being installed.
     # See https://bugzilla.mozilla.org/show_bug.cgi?id=1366564
     ac_add_options --disable-xcode-checks
 else
     FLAGS=""
 fi
 
-if [ -d $TOOLTOOL_DIR ]; then
+if [ -d $TOOLTOOL_DIR/clang ]; then
     export CC="$TOOLTOOL_DIR/clang/bin/clang $FLAGS"
     export CXX="$TOOLTOOL_DIR/clang/bin/clang++ $FLAGS"
     export CPP="$TOOLTOOL_DIR/clang/bin/clang $FLAGS -E"
     export LLVMCONFIG=$TOOLTOOL_DIR/clang/bin/llvm-config
     export DSYMUTIL=$TOOLTOOL_DIR/clang/bin/llvm-dsymutil
     # Use an updated linker.
     ldflags="$ldflags -B$TOOLTOOL_DIR/cctools/bin "
     export AR=$TOOLTOOL_DIR/cctools/bin/ar
     export RANLIB=$TOOLTOOL_DIR/cctools/bin/ranlib
+
+    # Don't try to use SDK for building tools that run on the host.
+    export HOST_CC="$topsrcdir/clang/bin/clang"
+    export HOST_CXX="$topsrcdir/clang/bin/clang++"
+    export HOST_CPP="$topsrcdir/clang/bin/clang -E"
+    export HOST_CFLAGS="-g"
+    export HOST_CXXFLAGS="-g"
+    export HOST_LDFLAGS="-g"
 fi
 
 # Ensure the updated linker doesn't generate things our older build tools
 # don't understand.
 ldflags="$ldflags -Wl,-no_data_in_code_info"
 export LDFLAGS="$ldflags"
 
 # If not set use the system default clang