summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-06-30 18:46:32 (GMT)
committerTobias Markmann <tm@ayena.de>2016-06-30 18:46:49 (GMT)
commita1be6105b97dddc1e03db0075f6ca3fc47fa8e1d (patch)
tree9abb38c4966a2b7871257b0f2e5df90764ce70c7 /BuildTools
parent82dd5a11131b3bd3641316b87aa279d806c970b0 (diff)
downloadswift-a1be6105b97dddc1e03db0075f6ca3fc47fa8e1d.zip
swift-a1be6105b97dddc1e03db0075f6ca3fc47fa8e1d.tar.bz2
Add initial support for code signing on OS X
See DEVELOPMENT.md for instructions. Test-Information: Tested using a self-signed code signing certificate created using Keychain Access.app. Compared the output of 'codesign -vvv -d' on Swift.app with preinstall apps. The output looks much the same except for the signing authority. Change-Id: Idbb3209ad917091c371ced61ec8a77e3e5d18884
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/SConscript.boot4
1 files changed, 4 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 13a49b8..f845159 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -104,6 +104,7 @@ vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for D
vars.Add(BoolVariable("check_headers", "Independently build compilation units for all Swiften headers for detecting missing dependencies.", "no"))
vars.Add("win_target_arch", "Target architecture for Windows builds. x86 for 32-bit (default) or x86_64 for 64-bit.", "x86")
vars.Add(BoolVariable("install_git_hooks", "Install git hooks", "true"))
+vars.Add("codesign_identity", "macOS code signing identity to be passed to codesign when building the distribution package. Must match the Commen Name of the Subject of the code signing certificate.", "")
################################################################################
# Set up default build & configure environment
@@ -370,6 +371,9 @@ if env["PLATFORM"] == "hpux" :
# FIXME: Need -AA for linking C++ but not C
#env.Append(LINKFLAGS = ["-AA"])
+# Code signing
+if env["PLATFORM"] == "darwin" :
+ env["CODE_SIGN_IDENTITY"] = env["codesign_identity"]
# Testing
env["TEST_TYPE"] = env["test"]