aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 16 insertions, 5 deletions
diff --git a/configure b/configure
index b98ad815..d01e6b29 100755
--- a/configure
+++ b/configure
@@ -73,6 +73,11 @@ probe_need() {
msg "looking for configure programs"
need_cmd mkdir
need_cmd printf
+need_cmd cut
+need_cmd grep
+need_cmd xargs
+need_cmd cp
+need_cmd find
msg "recreating config.mk"
echo '' >config.mk
@@ -82,7 +87,7 @@ for i in \
doc \
boot/fe boot/me boot/be boot/driver boot/util \
rt rt/isaac rt/bigint rt/sync rt/test \
- llvmext \
+ rustllvm \
stage0 stage1 stage2 \
test/run-pass test/run-fail test/compile-fail \
test/bench/99-bottles test/bench/shootout
@@ -123,9 +128,15 @@ then
CFG_LLVM_LIBDIR="$CFG_LLVM_ROOT/lib"
CFG_LLVM_CXXFLAGS="-I$CFG_LLVM_INCDIR"
CFG_LLVM_LDFLAGS=""
- CFG_LLVM_LIBS=$(find "$CFG_LLVM_LIBDIR" -name '*.lib' -exec echo '\"{}\"' ';' | xargs echo)
- CFG_LLVM_VERSION=$("$CFG_LLVM_BINDIR/llc" --version | grep version | cut -d ' ' -f 5-)
-elif [ ! -z "$CFG_LLVM_VERSION" ]
+ CFG_LLVM_LIBS=$(find "$CFG_LLVM_LIBDIR" \
+ -name '*.lib' \
+ -exec echo '\"{}\"' ';' \
+ | xargs echo)
+ CFG_LLVM_VERSION=$("$CFG_LLVM_BINDIR/llc" \
+ --version \
+ | grep version \
+ | cut -d ' ' -f 5-)
+elif [ ! -z "$CFG_LLVM_CONFIG" ]
then
CFG_LLVM_VERSION=$(llvm-config --version)
CFG_LLVM_INCDIR=$(llvm-config --includedir)
@@ -136,7 +147,7 @@ then
CFG_LLVM_LIBS=$(llvm-config --libs)
else
err "either the \"CFG_LLVM_ROOT\" environment variable must be set, or a \
-\"llvm-version\" script must be present"
+\"llvm-config\" script must be present"
fi
case $CFG_LLVM_VERSION in