configure: change --only-gcc to --enable-clang to make clang opt-in
This commit is contained in:
parent
9435459e89
commit
7c3616057d
1 changed files with 7 additions and 3 deletions
10
configure
vendored
10
configure
vendored
|
@ -249,7 +249,7 @@ opt valgrind 1 "run tests with valgrind"
|
||||||
opt docs 1 "build documentation"
|
opt docs 1 "build documentation"
|
||||||
opt optimize 1 "build optimized rust code"
|
opt optimize 1 "build optimized rust code"
|
||||||
opt mingw-cross 0 "cross-compile for win32 using mingw"
|
opt mingw-cross 0 "cross-compile for win32 using mingw"
|
||||||
opt only-gcc 0 "prefer gcc to clang for building the runtime"
|
opt clang 0 "prefer gcc to clang for building the runtime"
|
||||||
valopt prefix "/usr/local" "set installation prefix"
|
valopt prefix "/usr/local" "set installation prefix"
|
||||||
valopt llvm-root "" "set LLVM root"
|
valopt llvm-root "" "set LLVM root"
|
||||||
valopt target-triples "" "LLVM target triples (defaults to host if unset)"
|
valopt target-triples "" "LLVM target triples (defaults to host if unset)"
|
||||||
|
@ -284,7 +284,7 @@ probe CFG_TEX tex
|
||||||
probe CFG_MAKENSIS makensis
|
probe CFG_MAKENSIS makensis
|
||||||
probe CFG_NATURALDOCS naturaldocs
|
probe CFG_NATURALDOCS naturaldocs
|
||||||
|
|
||||||
if [ -z "$CFG_CLANG" -a -z "$CFG_GCC" ]
|
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
|
||||||
then
|
then
|
||||||
err "either clang or gcc is required"
|
err "either clang or gcc is required"
|
||||||
fi
|
fi
|
||||||
|
@ -351,8 +351,12 @@ case $CFG_LLVM_VERSION in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ! -z "$CFG_CLANG" -a -z "$CFG_ONLY_GCC" ]
|
if [ ! -z "$CFG_ENABLE_CLANG" ]
|
||||||
then
|
then
|
||||||
|
if [ -z "$CFG_CLANG" ]
|
||||||
|
then
|
||||||
|
err "clang requested but not found"
|
||||||
|
fi
|
||||||
CFG_CLANG_VERSION=$("$CFG_CLANG" \
|
CFG_CLANG_VERSION=$("$CFG_CLANG" \
|
||||||
--version \
|
--version \
|
||||||
| grep version \
|
| grep version \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue