diff options
author | Bob Wilson <bob.wilson@apple.com> | 2013-08-21 04:42:56 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2013-08-21 04:42:56 +0000 |
commit | 21afede01089ae194f0f9658f444aff0496220dd (patch) | |
tree | 8720d2cfe07b139f954762cd2e82fdf33bd80590 /make | |
parent | ebc0484ebbd1b7ed142b2851e3308559dabe79f7 (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.mk | 13 |
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 := |