summaryrefslogtreecommitdiff
path: root/share/qbs/modules/cpp/gcc.js
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-04-22 01:20:24 -0700
committerIvan Komissarov <ABBAPOH@gmail.com>2021-02-18 00:10:00 +0000
commit2bc823ec00cec8a1d58981710eb50ba85b4f58d7 (patch)
tree4397fc51e963e00f8ab6dbf7686d5e28cda40c01 /share/qbs/modules/cpp/gcc.js
parent05b74ff728e8c6bc975e8c55160e1feb137895a1 (diff)
downloadqbs-2bc823ec00cec8a1d58981710eb50ba85b4f58d7.tar.gz
Implement codesign module
This moves code signing functionality into a dedicated module, and also implements automatic provisioning for Apple platforms, which automatically selects appropriate signing identities and provisioning profiles based on the product being built. This also results in a significant performance improvement since all code signing setup information is retrieved in process instead of forking off the openssl and security command line tools. Task-number: QBS-899 Change-Id: I60d0aeaeb2d1004929505bcb1e0bc77512fe77bc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/gcc.js')
-rw-r--r--share/qbs/modules/cpp/gcc.js25
1 files changed, 3 insertions, 22 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index f49609f94..99452b6da 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -28,6 +28,7 @@
**
****************************************************************************/
+var Codesign = require("../codesign/codesign.js");
var Cpp = require("cpp.js");
var File = require("qbs.File");
var FileInfo = require("qbs.FileInfo");
@@ -1384,28 +1385,8 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
}
}
- if (product.xcode && product.bundle) {
- var actualSigningIdentity = product.xcode.actualSigningIdentity;
- var codesignDisplayName = product.xcode.actualSigningIdentityDisplayName;
- if (actualSigningIdentity && !product.bundle.isBundle) {
- args = product.xcode.codesignFlags || [];
- args.push("--force");
- args.push("--sign", actualSigningIdentity);
- args = args.concat(DarwinTools._codeSignTimestampFlags(product));
-
- for (var j in inputs.xcent) {
- args.push("--entitlements", inputs.xcent[j].filePath);
- break; // there should only be one
- }
- args.push(primaryOutput.filePath);
- cmd = new Command(product.xcode.codesignPath, args);
- cmd.description = "codesign "
- + primaryOutput.fileName
- + " using " + codesignDisplayName
- + " (" + actualSigningIdentity + ")";
- commands.push(cmd);
- }
- }
+ Array.prototype.push.apply(
+ commands, Codesign.prepareSign(project, product, inputs, outputs, input, output));
return commands;
}