summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-10 19:32:03 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-10 19:32:03 +0000
commit279a22ab3a2a5c838b7e80d67cbc970b7c12bbd8 (patch)
treee928fc2fc4adf2785aee6499320732f72a772708 /make
parenta11b52f4527d2b3f0a9ac10c9aa7a67aa1ff8272 (diff)
platform/clang_darwin: Improve the "can we build for this arch test" by checking
that the standard includes we use in compiler-rt also work. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@144305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_darwin.mk3
-rw-r--r--make/platform/clang_darwin_test_input.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 38a54696d..b3d36f829 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -12,7 +12,8 @@ CheckArches = \
$(shell \
result=""; \
for arch in $(1); do \
- if $(CC) -arch $$arch -c -x c /dev/null \
+ if $(CC) -arch $$arch -c \
+ $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
-o /dev/null > /dev/null 2> /dev/null; then \
result="$$result$$arch "; \
fi; \
diff --git a/make/platform/clang_darwin_test_input.c b/make/platform/clang_darwin_test_input.c
new file mode 100644
index 000000000..5a8898b8b
--- /dev/null
+++ b/make/platform/clang_darwin_test_input.c
@@ -0,0 +1,5 @@
+/* Include the headers we use in int_lib.h, to verify that they work. */
+
+#include <limits.h>
+#include <stdint.h>
+#include <math.h>