Skip to content

Commit 7c36160

Browse files
committed
configure: change --only-gcc to --enable-clang to make clang opt-in
1 parent 9435459 commit 7c36160

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

configure

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ opt valgrind 1 "run tests with valgrind"
249249
opt docs 1 "build documentation"
250250
opt optimize 1 "build optimized rust code"
251251
opt mingw-cross 0 "cross-compile for win32 using mingw"
252-
opt only-gcc 0 "prefer gcc to clang for building the runtime"
252+
opt clang 0 "prefer gcc to clang for building the runtime"
253253
valopt prefix "/usr/local" "set installation prefix"
254254
valopt llvm-root "" "set LLVM root"
255255
valopt target-triples "" "LLVM target triples (defaults to host if unset)"
@@ -284,7 +284,7 @@ probe CFG_TEX tex
284284
probe CFG_MAKENSIS makensis
285285
probe CFG_NATURALDOCS naturaldocs
286286

287-
if [ -z "$CFG_CLANG" -a -z "$CFG_GCC" ]
287+
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
288288
then
289289
err "either clang or gcc is required"
290290
fi
@@ -351,8 +351,12 @@ case $CFG_LLVM_VERSION in
351351
;;
352352
esac
353353

354-
if [ ! -z "$CFG_CLANG" -a -z "$CFG_ONLY_GCC" ]
354+
if [ ! -z "$CFG_ENABLE_CLANG" ]
355355
then
356+
if [ -z "$CFG_CLANG" ]
357+
then
358+
err "clang requested but not found"
359+
fi
356360
CFG_CLANG_VERSION=$("$CFG_CLANG" \
357361
--version \
358362
| grep version \

0 commit comments

Comments
 (0)