diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 20:49:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 20:49:22 +0000 |
commit | 866d2824095a5bc78307c103347695b52f3d49f0 (patch) | |
tree | bb0d91c85f7f9fe62ca44d500698f799a62f99e2 /Makefile | |
parent | 172e105cf58333a1a55468095c51d22868296a68 (diff) |
Support building for a single target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@80943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -44,19 +44,24 @@ $(call Set,ActiveLibGen,$(ActiveObjPath)/libcompiler_rt.Generic.a) $(call Set,ActiveLibOpt,$(ActiveObjPath)/libcompiler_rt.Optimized.a) # The sublibraries to use for a generic version. -$(call Set,GenericInputs,$(foreach arch,$(Archs),$(ActiveObjPath)/$(arch)/libcompiler_rt.Generic.a)) +$(call Set,GenericInputs,$(foreach arch,$(TargetArchs),$(ActiveObjPath)/$(arch)/libcompiler_rt.Generic.a)) # The sublibraries to use for an optimized version. -$(call Set,OptimizedInputs,$(foreach arch,$(Archs),$(ActiveObjPath)/$(arch)/libcompiler_rt.Optimized.a)) +$(call Set,OptimizedInputs,$(foreach arch,$(TargetArchs),$(ActiveObjPath)/$(arch)/libcompiler_rt.Optimized.a)) -# Provide top-level fat archive targets. +# Provide top-level fat archive targets. We make sure to not try to lipo if only +# building one target arch. $(ActiveLibGen): $(GenericInputs) $(ActiveObjPath)/.dir $(Summary) " UNIVERSAL: $(ActiveConfig): $$@" -$(Verb) $(RM) $$@ - $(Verb) $(Lipo) -create -output $$@ $(GenericInputs) + $(if $(TargetArch), \ + $(Verb) $(CP) $(GenericInputs) $$@, \ + $(Verb) $(Lipo) -create -output $$@ $(GenericInputs)) $(ActiveLibOpt): $(OptimizedInputs) $(ActiveObjPath)/.dir $(Summary) " UNIVERSAL: $(ActiveConfig): $$@" -$(Verb) $(RM) $$@ - $(Verb) $(Lipo) -create -output $$@ $(OptimizedInputs) + $(if $(TargetArch), \ + $(Verb) $(CP) $(GenericInputs) $$@, \ + $(Verb) $(Lipo) -create -output $$@ $(OptimizedInputs)) .PRECIOUS: $(ActiveObjPath)/.dir # Add to target lists. |