aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-04-30 17:06:40 +0000
committerBob Wilson <bob.wilson@apple.com>2013-04-30 17:06:40 +0000
commit2b26c909424953af8fa443d075e27e68c1571be4 (patch)
tree7a524ac0ca86c4d74430f7c3a1925ab8d0d54a20
parent6a72c9d8509bb8e751cb92e71407c039a767caa1 (diff)
Rewrite sw_vers makefile check to avoid error message on Linux.
When building compiler-rt on Linux, the "which sw_vers" check fails and writes an error message into the build log. Apparently on Solaris "which" writes the error message to stdout, so that the current test won't even work properly. As far as I know sw_vers always lives in /usr/bin, so just check for it there instead of using "which". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180792 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--make/platform/clang_darwin.mk4
1 files changed, 1 insertions, 3 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index ef96b0197..6755b4b34 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -83,14 +83,12 @@ UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64,ubsan_osx)
# object files. If we are on that platform, strip out all ARM archs. We still
# build the libraries themselves so that Clang can find them where it expects
# them, even though they might not have an expected slice.
-ifneq ($(shell which sw_vers),)
-ifneq ($(shell sw_vers -productVersion | grep 10.6),)
+ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),)
UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios))
UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext))
UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5))
UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios))
endif
-endif
# If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
# are intended to support and limit what we try to build to that.