mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 09:53:26 +00:00
auto merge of #10970 : erickt/rust/master, r=alexcrichton
This modifies the `configure` to set `CFG_ENABLE_CLANG=1` if `gcc` is actually `clang`. This is needed because OS X's clang enables warning on unused command line arguments. Our build system suppresses this by default, but when `CFG_ENABLE_CLANGE=0`, we do not. This causes one of the tests to fail. This patch changes rust to directly use clang, which fixes the build failure. Closes #10811
This commit is contained in:
commit
09bfb3b473
14
configure
vendored
14
configure
vendored
@ -544,12 +544,24 @@ then
|
||||
putvar CFG_ENABLE_CLANG
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
|
||||
then
|
||||
err "either clang or gcc is required"
|
||||
fi
|
||||
|
||||
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
|
||||
# system, so if we find that gcc is clang, we should just use clang directly.
|
||||
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
|
||||
then
|
||||
CFG_OSX_GCC_VERSION=$("$CFG_GCC" --version 2>&1 | grep "Apple LLVM version")
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
step_msg "on OS X 10.9, forcing use of clang"
|
||||
CFG_ENABLE_CLANG=1
|
||||
putvar CFG_ENABLE_CLANG
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
|
||||
then
|
||||
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
|
||||
|
Loading…
Reference in New Issue
Block a user