Test case to insure template function declaration refers to correct filename. Radar...
[oota-llvm.git] / Makefile.rules
index 12582f6f91d2b741361708e93cd14b2048b05592..44b8328f422b2a721aa018984402f7827089e2d8 100644 (file)
@@ -203,7 +203,6 @@ ifdef LLVMC_PLUGIN
 
 LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN))
 CPP.Flags += -DLLVMC_PLUGIN_NAME=$(LLVMC_PLUGIN)
-REQUIRES_EH := 1
 
 ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
   LD.Flags += -lCompilerDriver
@@ -226,8 +225,6 @@ ifdef LLVMC_BASED_DRIVER
 
 TOOLNAME = $(LLVMC_BASED_DRIVER)
 
-REQUIRES_EH := 1
-
 ifeq ($(ENABLE_LLVMC_DYNAMIC),1)
   LD.Flags += -lCompilerDriver
 else
@@ -622,7 +619,6 @@ endif
 
 # Adjust linker flags for building an executable
 ifneq ($(HOST_OS),Darwin)
-ifneq ($(DARWIN_MAJVERS),4)
 ifdef TOOLNAME
   LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
   ifdef EXAMPLE_TOOL
@@ -631,7 +627,6 @@ ifdef TOOLNAME
     LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC)
   endif
 endif
-endif
 else
 ifneq ($(DARWIN_MAJVERS),4)
   LD.Flags += $(RPATH) -Wl,@executable_path/../lib
@@ -1341,10 +1336,33 @@ endif
 endif
 
 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD))
+ifneq ($(ARCH), Mips)
   LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
 endif
 endif
+endif
+
+#---------------------------------------------------------
+# Tool Version Info Support
+#---------------------------------------------------------
 
+ifeq ($(HOST_OS),Darwin)
+ifdef TOOL_INFO_PLIST
+
+LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST)
+
+$(ToolBuildPath): $(ObjDir)/$(TOOL_INFO_PLIST)
+
+$(ObjDir)/$(TOOL_INFO_PLIST): $(PROJ_SRC_DIR)/$(TOOL_INFO_PLIST).in $(ObjDir)/.dir
+       $(Echo) "Creating $(TOOLNAME) '$(TOOL_INFO_PLIST)' file..."
+       $(Verb)sed -e "s#@TOOL_INFO_UTI@#$(TOOL_INFO_UTI)#g" \
+                  -e "s#@TOOL_INFO_NAME@#$(TOOL_INFO_NAME)#g" \
+                  -e "s#@TOOL_INFO_VERSION@#$(TOOL_INFO_VERSION)#g" \
+                -e "s#@TOOL_INFO_BUILD_VERSION@#$(TOOL_INFO_BUILD_VERSION)#g" \
+                  $< > $@
+
+endif
+endif
 
 #---------------------------------------------------------
 # Provide targets for building the tools