headers. The remaining headers require more sophisticated
requirements; they'll be handled separately. Part of
<rdar://problem/
10710060>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149206
91177308-0d34-0410-b5e6-
96231b3b80d8
xmmintrin.h
cpuid.h
unwind.h
+ module.map
)
set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include)
$(Verb) cp $< $@
$(Echo) Copying $(notdir $<) to build dir
+$(HeaderDir)/module.map: $(PROJ_SRC_DIR)/module.map $(HeaderDir)/.dir
+ $(Verb) cp $< $@
+ $(Echo) Copying $(notdir $<) to build dir
+
+
# Hook into the standard Makefile rules.
-all-local:: $(OBJHEADERS)
+all-local:: $(OBJHEADERS) $(HeaderDir)/module.map
PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include
$(Verb) $(DataInstall) $< $(PROJ_headers)
$(Echo) Installing compiler include file: $(notdir $<)
-install-local:: $(INSTHEADERS)
+$(PROJ_headers)/module.map: $(HeaderDir)/module.map | $(PROJ_headers)
+ $(Verb) $(DataInstall) $< $(PROJ_headers)
+ $(Echo) Installing compiler module map file: $(notdir $<)
+
+
+install-local:: $(INSTHEADERS) $(PROJ_headers)/module.map
$(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(CLANG_TBLGEN) $(ObjDir)/.dir
$(Echo) "Building Clang arm_neon.h.inc with tblgen"
--- /dev/null
+module __compiler_builtins [system] {
+ explicit module float_constants {
+ header "float.h"
+ }
+
+ explicit module iso646 {
+ header "iso646.h"
+ }
+
+ explicit module limits {
+ header "limits.h"
+ }
+
+ explicit module stdalign {
+ header "stdalign.h"
+ }
+
+ explicit module stdarg {
+ header "stdarg.h"
+ }
+
+ explicit module stdbool {
+ header "stdbool.h"
+ }
+
+ explicit module stddef {
+ header "stddef.h"
+ }
+
+ explicit module stdint {
+ header "stdint.h"
+ }
+
+ explicit module tgmath {
+ header "tgmath.h"
+ }
+
+ // FIXME: add various altivec, *intrin headers.
+}
--- /dev/null
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -verify %s
+
+@import __compiler_builtins.float_constants;
+
+float getFltMax() { return FLT_MAX; }
+
+@import __compiler_builtins.limits;
+
+char getCharMax() { return CHAR_MAX; }
+
+size_t size; // expected-error{{unknown type name 'size_t'}}