From 638095fa8f3c21b416745ac705051bfebb7fa6b5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 10 Nov 2011 19:32:03 +0000 Subject: [PATCH] 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. llvm-svn: 144305 --- compiler-rt/make/platform/clang_darwin.mk | 3 ++- compiler-rt/make/platform/clang_darwin_test_input.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 compiler-rt/make/platform/clang_darwin_test_input.c diff --git a/compiler-rt/make/platform/clang_darwin.mk b/compiler-rt/make/platform/clang_darwin.mk index 38a54696dd24..b3d36f829aa5 100644 --- a/compiler-rt/make/platform/clang_darwin.mk +++ b/compiler-rt/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/compiler-rt/make/platform/clang_darwin_test_input.c b/compiler-rt/make/platform/clang_darwin_test_input.c new file mode 100644 index 000000000000..5a8898b8b42a --- /dev/null +++ b/compiler-rt/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 +#include +#include