From 21afede01089ae194f0f9658f444aff0496220dd Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Wed, 21 Aug 2013 04:42:56 +0000 Subject: 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 --- make/platform/clang_darwin.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'make') 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 := -- cgit v1.2.3