summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-08-21 04:42:56 +0000
committerBob Wilson <bob.wilson@apple.com>2013-08-21 04:42:56 +0000
commite7ca6f93599c4d54eba711011fe5ad7fdddad1e9 (patch)
treef8e91ef9b34177550dde413e342246c28ba7452f /compiler-rt
parent3151d7c76a641b61347b667d1e6f757b6007f548 (diff)
downloadbcm5719-llvm-e7ca6f93599c4d54eba711011fe5ad7fdddad1e9.tar.gz
bcm5719-llvm-e7ca6f93599c4d54eba711011fe5ad7fdddad1e9.zip
For Darwin builds, locate tools using xcrun when available.
The make/platform/darwin_bni.mk file already has similar code but we apparently neglected to add it to the clang_darwin.mk file. llvm-svn: 188864
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/make/platform/clang_darwin.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler-rt/make/platform/clang_darwin.mk b/compiler-rt/make/platform/clang_darwin.mk
index fc599f1ab6b..f279694a59a 100644
--- a/compiler-rt/make/platform/clang_darwin.mk
+++ b/compiler-rt/make/platform/clang_darwin.mk
@@ -25,9 +25,20 @@ CheckArches = \
done; \
echo $$result)
+XCRun = \
+ $(shell \
+ result=`xcrun -find $(1) 2> /dev/null`; \
+ if [ "$$?" != "0"; then result=$(1); fi; \
+ echo $$result)
+
###
-CC := clang
+CC := $(call XCRun,clang)
+AR := $(call XCRun,ar)
+RANLIB := $(call XCRun,ranlib)
+STRIP := $(call XCRun,strip)
+LIPO := $(call XCRun,lipo)
+DSYMUTIL := $(call XCRun,dsymutil)
Configs :=
UniversalArchs :=
OpenPOWER on IntegriCloud