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
diff --git a/make/platform/clang_darwin.mk b/make/platform/clang_darwin.mk
index 38a5469..b3d36f8 100644
--- a/make/platform/clang_darwin.mk
+++ b/make/platform/clang_darwin.mk
@@ -12,7 +12,8 @@
$(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 0000000..5a8898b
--- /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>