aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-05-04 18:28:30 -0700
committerPatrick Walton <[email protected]>2011-05-04 18:29:08 -0700
commit04f966f0bc8d092a000e5b6dad0bdd3353ec4efe (patch)
treec958e9b9b37c6b687312137f34d2b561fb3ad49d /configure
parentAdd stage-specific test targets (make check-stage1 etc.) (diff)
downloadrust-04f966f0bc8d092a000e5b6dad0bdd3353ec4efe.tar.xz
rust-04f966f0bc8d092a000e5b6dad0bdd3353ec4efe.zip
build: Build intrinsics.bc
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure
index a2d6063a..a359de9c 100755
--- a/configure
+++ b/configure
@@ -122,6 +122,7 @@ need_cmd find
need_cmd uname
need_cmd date
need_cmd tr
+need_cmd sed
msg "inspecting environment"
@@ -215,6 +216,10 @@ then
--version \
| grep version \
| cut -d ' ' -f 5-)
+ CFG_LLVM_TRIPLE=$("$CFG_LLVM_BINDIR/llc" \
+ --version \
+ | grep Host: \
+ | cut -d ' ' -f 4-)
elif [ ! -z "$CFG_LLVM_CONFIG" ]
then
CFG_LLVM_VERSION=$(llvm-config --version)
@@ -224,6 +229,7 @@ then
CFG_LLVM_CXXFLAGS=$(llvm-config --cxxflags)
CFG_LLVM_LDFLAGS=$(llvm-config --ldflags)
CFG_LLVM_LIBS=$(llvm-config --libs)
+ CFG_LLVM_TRIPLE=$(llvm-config --host-target)
else
err "either the \"CFG_LLVM_ROOT\" environment variable must be set, or a \
\"llvm-config\" script must be present"
@@ -244,6 +250,7 @@ putvar CFG_LLVM_LIBDIR
putvar CFG_LLVM_CXXFLAGS
putvar CFG_LLVM_LDFLAGS
putvar CFG_LLVM_LIBS
+putvar CFG_LLVM_TRIPLE
# Munge any paths that appear in config.mk back to posix-y
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' \