Skip to content

Commit 415f546

Browse files
authored
Merge pull request #40093 from rmaz/swift_stdlib_tool_main_fix
[swift-stdlib-tool] use correct paths when codesigning
2 parents b8e16e8 + e9fe603 commit 415f546

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/swift-stdlib-tool/swift-stdlib-tool.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,13 +1226,13 @@ int main(int argc, const char *argv[]) {
12261226
// and $build_dir/$unsigned_frameworks
12271227
if (copy) {
12281228
copyLibraries(dst_dir, swiftLibs, stripBitcode);
1229-
if (unsigned_dst_dir.empty()) {
1229+
if (!unsigned_dst_dir.empty()) {
12301230
// Never strip bitcode from the unsigned libraries.
12311231
// Their existing signatures must be preserved.
12321232
copyLibraries(unsigned_dst_dir, swiftLibs, false);
12331233
}
12341234

1235-
if (resource_dst_dir.empty()) {
1235+
if (!resource_dst_dir.empty()) {
12361236
// Never strip bitcode from resources libraries, for
12371237
// the same reason as the libraries copied to
12381238
// unsigned_dst_dir.
@@ -1242,7 +1242,7 @@ int main(int argc, const char *argv[]) {
12421242

12431243
// Codesign the Swift libraries in $build_dir/$frameworks
12441244
// but not the libraries in $build_dir/$unsigned_frameworks.
1245-
if (ident.empty()) {
1245+
if (!ident.empty()) {
12461246
// Swift libraries that are up-to-date get codesigned anyway
12471247
// (in case options changed or a previous build was incomplete).
12481248
// We do employ an optimization, however, if resigning the dylib
@@ -1269,7 +1269,7 @@ int main(int argc, const char *argv[]) {
12691269
// to preserve it in case it does not change. We can use
12701270
// this to avoid unnecessary copies during delta installs
12711271
// to devices.
1272-
const auto dst = dst_dir + "/" + lib;
1272+
const auto dst = dst_dir + "/" + filename(lib);
12731273
const auto oldSignatureData = query_code_signature(dst);
12741274
const char *tmpFilePath = 0;
12751275
if (!oldSignatureData.empty()) {

0 commit comments

Comments
 (0)