[PATCH] configure+make: install include/sanitizer into Clang

Alexander Potapenko glider at google.com
Thu Oct 17 05:44:05 PDT 2013


Hi samsonov, ddunbar,

When building Clang with compiler-rt, copy the contents of compiler-rt/include/sanitizer into lib/clang/3.4/include/sanitizer

http://llvm-reviews.chandlerc.com/D1959

Files:
  runtime/compiler-rt/Makefile

Index: runtime/compiler-rt/Makefile
===================================================================
--- runtime/compiler-rt/Makefile
+++ runtime/compiler-rt/Makefile
@@ -23,6 +23,7 @@
 PROJ_resources := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)
 
 ResourceLibDir := $(ResourceDir)/lib
+ResourceIncludeDir := $(ResourceDir)/include
 PROJ_resources_lib := $(PROJ_resources)/lib
 
 # Expect compiler-rt to be in llvm/projects/compiler-rt
@@ -136,7 +137,7 @@
 #
 # We build all the libraries in a single shot to avoid recursive make as much as
 # possible.
-BuildRuntimeLibraries:
+BuildRuntimeLibraries: $(ResourceIncludeDir)/sanitizer
 	$(Verb) $(MAKE) -C $(COMPILERRT_SRC_ROOT) \
 	  ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
 	  ProjObjRoot=$(PROJ_OBJ_DIR) \
@@ -154,6 +155,14 @@
 $(PROJ_resources_lib):
 	$(Verb) $(MKDIR) $@
 
+$(ResourceIncludeDir):
+	$(Verb) $(MKDIR) $@
+
+$(ResourceIncludeDir)/sanitizer: $(ResourceIncludeDir)
+	$(Verb) $(MKDIR) $@
+	$(Echo) Installing compiler runtime headers: $1/$$*
+	$(Verb) cp $(COMPILERRT_SRC_ROOT)/include/sanitizer/*.h $@
+
 # Expand rules for copying/installing each individual library. We can't use
 # implicit rules here because we need to match against multiple things.
 define RuntimeLibraryTemplate
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1959.1.patch
Type: text/x-patch
Size: 1261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131017/635e3cd2/attachment.bin>


More information about the cfe-commits mailing list