aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/compiler-rt/Makefile35
1 files changed, 29 insertions, 6 deletions
diff --git a/runtime/compiler-rt/Makefile b/runtime/compiler-rt/Makefile
index f1335910f1..f0c224208d 100644
--- a/runtime/compiler-rt/Makefile
+++ b/runtime/compiler-rt/Makefile
@@ -74,8 +74,9 @@ RuntimeDirs :=
ifeq ($(OS),Darwin)
RuntimeDirs += darwin
RuntimeLibrary.darwin.Configs := \
- eprintf 10.4 osx cc_kext \
- asan_osx profile_osx
+ eprintf.a 10.4.a osx.a cc_kext.a \
+ asan_osx.a asan_osx_dynamic.dylib \
+ profile_osx.a
endif
# On Linux, include a library which has all the runtime functions.
@@ -86,11 +87,11 @@ RuntimeLibrary.linux.Configs :=
# We currently only try to generate runtime libraries on x86.
ifeq ($(ARCH),x86)
RuntimeLibrary.linux.Configs += \
- full-i386 profile-i386 asan-i386
+ full-i386.a profile-i386.a asan-i386.a
endif
ifeq ($(ARCH),x86_64)
RuntimeLibrary.linux.Configs += \
- full-x86_64 profile-x86_64 asan-x86_64 tsan-x86_64
+ full-x86_64.a profile-x86_64.a asan-x86_64.a tsan-x86_64.a
endif
endif
@@ -126,6 +127,10 @@ $(PROJ_resources_lib):
define RuntimeLibraryTemplate
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.a: BuildRuntimeLibraries
@true
+$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.so: BuildRuntimeLibraries
+ @true
+$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.dylib: BuildRuntimeLibraries
+ @true
.PRECIOUS: $(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.a
# Rule to copy the libraries to their resource directory location.
@@ -134,8 +139,18 @@ $(ResourceLibDir)/$1/libclang_rt.%.a: \
$(ResourceLibDir)/$1/.dir
$(Echo) Copying runtime library $1/$$* to build dir
$(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.a $$@
+$(ResourceLibDir)/$1/libclang_rt.%.so: \
+ $(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.so \
+ $(ResourceLibDir)/$1/.dir
+ $(Echo) Copying runtime library $1/$$* to build dir
+ $(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.so $$@
+$(ResourceLibDir)/$1/libclang_rt.%.dylib: \
+ $(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.dylib \
+ $(ResourceLibDir)/$1/.dir
+ $(Echo) Copying runtime library $1/$$* to build dir
+ $(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.dylib $$@
RuntimeLibrary.$1: \
- $(RuntimeLibrary.$1.Configs:%=$(ResourceLibDir)/$1/libclang_rt.%.a)
+ $(RuntimeLibrary.$1.Configs:%=$(ResourceLibDir)/$1/libclang_rt.%)
.PHONY: RuntimeLibrary.$1
$(PROJ_resources_lib)/$1: $(PROJ_resources_lib)
@@ -145,10 +160,18 @@ $(PROJ_resources_lib)/$1/libclang_rt.%.a: \
$(ResourceLibDir)/$1/libclang_rt.%.a | $(PROJ_resources_lib)/$1
$(Echo) Installing compiler runtime library: $1/$$*
$(Verb) $(DataInstall) $$< $(PROJ_resources_lib)/$1
+$(PROJ_resources_lib)/$1/libclang_rt.%.so: \
+ $(ResourceLibDir)/$1/libclang_rt.%.so | $(PROJ_resources_lib)/$1
+ $(Echo) Installing compiler runtime library: $1/$$*
+ $(Verb) $(DataInstall) $$< $(PROJ_resources_lib)/$1
+$(PROJ_resources_lib)/$1/libclang_rt.%.dylib: \
+ $(ResourceLibDir)/$1/libclang_rt.%.dylib | $(PROJ_resources_lib)/$1
+ $(Echo) Installing compiler runtime library: $1/$$*
+ $(Verb) $(DataInstall) $$< $(PROJ_resources_lib)/$1
# Rule to install runtime libraries.
RuntimeLibraryInstall.$1: \
- $(RuntimeLibrary.$1.Configs:%=$(PROJ_resources_lib)/$1/libclang_rt.%.a)
+ $(RuntimeLibrary.$1.Configs:%=$(PROJ_resources_lib)/$1/libclang_rt.%)
.PHONY: RuntimeLibraryInstall.$1
endef
$(foreach lib,$(RuntimeDirs), $(eval $(call RuntimeLibraryTemplate,$(lib))))