[swift-stdlib-tool] fix inverted logic

This commit is contained in:
Richard Howell
2021-11-08 13:21:29 -08:00
parent 2b41beeb12
commit 4fcccfd9ba

View File

@@ -1226,13 +1226,13 @@ int main(int argc, const char *argv[]) {
// and $build_dir/$unsigned_frameworks
if (copy) {
copyLibraries(dst_dir, swiftLibs, stripBitcode);
if (unsigned_dst_dir.empty()) {
if (!unsigned_dst_dir.empty()) {
// Never strip bitcode from the unsigned libraries.
// Their existing signatures must be preserved.
copyLibraries(unsigned_dst_dir, swiftLibs, false);
}
if (resource_dst_dir.empty()) {
if (!resource_dst_dir.empty()) {
// Never strip bitcode from resources libraries, for
// the same reason as the libraries copied to
// unsigned_dst_dir.
@@ -1242,7 +1242,7 @@ int main(int argc, const char *argv[]) {
// Codesign the Swift libraries in $build_dir/$frameworks
// but not the libraries in $build_dir/$unsigned_frameworks.
if (ident.empty()) {
if (!ident.empty()) {
// Swift libraries that are up-to-date get codesigned anyway
// (in case options changed or a previous build was incomplete).
// We do employ an optimization, however, if resigning the dylib