Skip to content

Commit

Permalink
build/Darwin: Make it easy to cause all tools to get codesigned (with…
Browse files Browse the repository at this point in the history
… make CODESIGN_TOOLS=1).

 - On OS X 10.7+ this is apparently recommended practice. This maybe should
   become a configurey thing one day, but I'm not sure it is right to
   automatically turn it on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152133 91177308-0d34-0410-b5e6-96231b3b80d8
ddunbar committed Mar 6, 2012
1 parent bde1b2a commit 9566905
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile.rules
Original file line number Diff line number Diff line change
@@ -1492,12 +1492,23 @@ else
$(ToolBuildPath): $(ToolDir)/.dir
endif

ifdef CODESIGN_TOOLS
$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
$(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
$(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
$(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
$(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
$(StripWarnMsg)
$(Echo) ======= Code-Signing $(BuildMode) Executable $(TOOLNAME)
$(Verb) codesign -s - $@
else
$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
$(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
$(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
$(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS)
$(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
$(StripWarnMsg)
endif

ifneq ($(strip $(ToolAliasBuildPath)),)
$(ToolAliasBuildPath): $(ToolBuildPath)

0 comments on commit 9566905

Please sign in to comment.