MachO: add dummy armv6m architecture directory so clang_macho_embedded builds things.
authorTim Northover <tnorthover@apple.com>
Thu, 10 Jul 2014 10:06:42 +0000 (10:06 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 10 Jul 2014 10:06:42 +0000 (10:06 +0000)
Without some mention of armv6m in a subdirectory of builtins, the make code
doesn't even know that armv6m exists and is something it should be looking for
in the platform-specific Makefiles. This means that none of the functions
listed actually get built and we end up with an almost entirely empty
libclang_rt.a for armv6m.

Unfortunately, the assembly code in the usual arm directory has no hope of
running on armv6m, which only supports Thumb-1 (not even ARM mode), so adding
it there won't work. Realistically, we probably *will* want to put any
optimised versions in a separate directory, so creating it now is harmless.

rdar://problem/17613576

llvm-svn: 212696

compiler-rt/lib/builtins/Makefile.mk
compiler-rt/lib/builtins/armv6m/Makefile.mk [new file with mode: 0644]

index 3143d91..4dbadd0 100644 (file)
@@ -11,7 +11,7 @@ ModuleName := builtins
 SubDirs :=
 
 # Add arch specific optimized implementations.
-SubDirs += i386 ppc x86_64 arm
+SubDirs += i386 ppc x86_64 arm armv6m
 
 # Define the variables for this specific directory.
 Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file)))
diff --git a/compiler-rt/lib/builtins/armv6m/Makefile.mk b/compiler-rt/lib/builtins/armv6m/Makefile.mk
new file mode 100644 (file)
index 0000000..f3c1807
--- /dev/null
@@ -0,0 +1,20 @@
+#===- lib/builtins/arm/Makefile.mk -------------------------*- Makefile -*--===#
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+#===------------------------------------------------------------------------===#
+
+ModuleName := builtins
+SubDirs := 
+OnlyArchs := armv6m
+
+AsmSources := $(foreach file,$(wildcard $(Dir)/*.S),$(notdir $(file)))
+Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file)))
+ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
+Implementation := Optimized
+
+# FIXME: use automatic dependencies?
+Dependencies := $(wildcard lib/*.h $(Dir)/*.h)