Allow users to choose identity used to sign tools.
authorFilipe Cabecinhas <me@filcab.net>
Thu, 25 Apr 2013 01:17:54 +0000 (01:17 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Thu, 25 Apr 2013 01:17:54 +0000 (01:17 +0000)
Summary:
No change if the identity isn't defined by the makefile.

Reviewers: echristo

Differential Revision: http://llvm-reviews.chandlerc.com/D632

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180240 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 0a07be533713703d55ceaa8d35ba62bd3e55d2e9..f0c542b7f82cd28432101bd1caa72db22cfc5b54 100644 (file)
@@ -1515,6 +1515,8 @@ $(ToolBuildPath): $(ToolDir)/.dir
 endif
 
 ifdef CODESIGN_TOOLS
+TOOL_CODESIGN_IDENTITY ?= -
+
 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
        $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
        $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
@@ -1522,7 +1524,7 @@ $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
        $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \
           $(StripWarnMsg)
        $(Echo) ======= Code-Signing $(BuildMode) Executable $(TOOLNAME)
-       $(Verb) codesign -s - $@
+       $(Verb) codesign -s $(TOOL_CODESIGN_IDENTITY) $@
 else
 $(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
        $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)