summaryrefslogtreecommitdiff
path: root/make
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
commit21afede01089ae194f0f9658f444aff0496220dd (patch)
tree8720d2cfe07b139f954762cd2e82fdf33bd80590 /make
parentebc0484ebbd1b7ed142b2851e3308559dabe79f7 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_darwin.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index fc599f1ab..f279694a5 100644
--- a/make/platform/clang_darwin.mk
+++ b/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 :=