[compiler-rt] r188864 - For Darwin builds, locate tools using xcrun when available.
Bob Wilson
bob.wilson at apple.com
Tue Aug 20 21:42:56 PDT 2013
Author: bwilson
Date: Tue Aug 20 23:42:56 2013
New Revision: 188864
URL: http://llvm.org/viewvc/llvm-project?rev=188864&view=rev
Log:
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.
Modified:
compiler-rt/trunk/make/platform/clang_darwin.mk
Modified: compiler-rt/trunk/make/platform/clang_darwin.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_darwin.mk?rev=188864&r1=188863&r2=188864&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_darwin.mk (original)
+++ compiler-rt/trunk/make/platform/clang_darwin.mk Tue Aug 20 23:42:56 2013
@@ -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 :=
More information about the llvm-commits
mailing list