aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-05-08 21:10:04 -0700
committerPatrick Walton <[email protected]>2011-05-08 21:10:43 -0700
commit269550f6736c911e28ec9f01e88d9afeb47f12ec (patch)
tree2b0298d7d807d5786a900791acd45fe1f87c0f65 /configure
parentrt: Consistently refer to structs as structs and classes as classes. Clang co... (diff)
downloadrust-269550f6736c911e28ec9f01e88d9afeb47f12ec.tar.xz
rust-269550f6736c911e28ec9f01e88d9afeb47f12ec.zip
build: Use clang to compile the runtime if available
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure b/configure
index 897209a3..f24de59c 100755
--- a/configure
+++ b/configure
@@ -194,12 +194,13 @@ putvar CFG_CPUTYPE
putvar CFG_CONFIGURE_ARGS
step_msg "looking for build programs"
-probe_need CFG_GCC gcc
probe_need CFG_GIT git
probe_need CFG_PERL perl
probe_need CFG_PYTHON python
probe_need CFG_CURL curl
+probe CFG_CLANG clang
+probe CFG_GCC gcc
probe CFG_LLVM_CONFIG llvm-config
probe CFG_VALGRIND valgrind
probe CFG_OCAMLC ocamlc
@@ -211,6 +212,11 @@ probe CFG_MAKEINFO makeinfo
probe CFG_TEXI2PDF texi2pdf
probe CFG_TEX tex
+if [ -z "$CFG_CLANG" -a -z "$CFG_GCC" ]
+then
+ err "either clang or gcc is required"
+fi
+
# Valgrind is only reliable on Linux. On Windows it doesn't work at all, and
# on the Mac the dynamic linker causes Valgrind to emit a huge stream of
# errors.