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
This commit is contained in:
Bob Wilson 2013-08-21 04:42:56 +00:00
parent 3151d7c76a
commit e7ca6f9359
1 changed files with 12 additions and 1 deletions

View File

@ -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 :=