diff --git a/Sources/SWBAndroidPlatform/AndroidSDK.swift b/Sources/SWBAndroidPlatform/AndroidSDK.swift index 3b934838..db1ae329 100644 --- a/Sources/SWBAndroidPlatform/AndroidSDK.swift +++ b/Sources/SWBAndroidPlatform/AndroidSDK.swift @@ -57,10 +57,6 @@ public import Foundation let metaPath = ndkPath.path.join("meta") - guard #available(macOS 14, *) else { - throw StubError.error("Unsupported macOS version") - } - if version < Self.minimumNDKVersion { throw Error.unsupportedVersion(path: ndkPath, minimumVersion: Self.minimumNDKVersion) } diff --git a/Sources/SWBCore/SpecImplementations/Tools/CodeSign.swift b/Sources/SWBCore/SpecImplementations/Tools/CodeSign.swift index 373b3e93..5e56a5fb 100644 --- a/Sources/SWBCore/SpecImplementations/Tools/CodeSign.swift +++ b/Sources/SWBCore/SpecImplementations/Tools/CodeSign.swift @@ -191,10 +191,8 @@ public final class CodesignToolSpec : CommandLineToolSpec, SpecIdentifierType, @ commandLine.append(contentsOf: ["--launch-constraint-responsible", responsibleProcessLaunchConstraint.str]) } - if cbc.producer.systemInfo?.operatingSystemVersion >= Version(14) { - if let libraryLoadConstraint = cbc.producer.signingSettings?.libraryConstraint { - commandLine.append(contentsOf: ["--library-constraint", libraryLoadConstraint.str]) - } + if let libraryLoadConstraint = cbc.producer.signingSettings?.libraryConstraint { + commandLine.append(contentsOf: ["--library-constraint", libraryLoadConstraint.str]) } // Add the path to the file to sign. diff --git a/Tests/SWBTaskConstructionTests/CodeSignTaskConstructionTests.swift b/Tests/SWBTaskConstructionTests/CodeSignTaskConstructionTests.swift index 33972fe8..65bc5eb1 100644 --- a/Tests/SWBTaskConstructionTests/CodeSignTaskConstructionTests.swift +++ b/Tests/SWBTaskConstructionTests/CodeSignTaskConstructionTests.swift @@ -1087,22 +1087,13 @@ fileprivate struct CodeSignTaskConstructionTests: CoreBasedTests { let testWorkspace = TestWorkspace("aWorkspace", projects: [testProject]) let tester = try await TaskConstructionTester(getCore(), testWorkspace) - // Check --library-constraint is passed when the build setting is configured on macOS 14 - await tester.checkBuild(BuildParameters(action: .install, configuration: "Release", overrides: ["LIBRARY_LOAD_CONSTRAINT": "/tmp/LibraryLoadConstraint.plist"]), runDestination: .macOS, systemInfo: SystemInfo(operatingSystemVersion: Version(14), productBuildVersion: "99A98", nativeArchitecture: "arm64")) { results in + // Check --library-constraint is passed + await tester.checkBuild(BuildParameters(action: .install, configuration: "Release", overrides: ["LIBRARY_LOAD_CONSTRAINT": "/tmp/LibraryLoadConstraint.plist"]), runDestination: .macOS) { results in results.checkTarget("Tool") { target in results.checkTask(.matchTarget(target), .matchRuleType("CodeSign")) { task in task.checkCommandLineMatches(["/usr/bin/codesign", "--force", "--sign", "-", "--entitlements", .suffix("Tool.xcent"), "--generate-entitlement-der", "--library-constraint", .suffix("LibraryLoadConstraint.plist"), "/tmp/aProject.dst/usr/local/bin/Tool"]) } } } - - // Check --library-constraint is *not* passed when the build setting is configured on macOS 13 - await tester.checkBuild(BuildParameters(action: .install, configuration: "Release", overrides: ["LIBRARY_LOAD_CONSTRAINT": "/tmp/LibraryLoadConstraint.plist"]), runDestination: .macOS, systemInfo: SystemInfo(operatingSystemVersion: Version(13), productBuildVersion: "99A98", nativeArchitecture: "arm64")) { results in - results.checkTarget("Tool") { target in - results.checkTask(.matchTarget(target), .matchRuleType("CodeSign")) { task in - task.checkCommandLineMatches(["/usr/bin/codesign", "--force", "--sign", "-", "--entitlements", .suffix("Tool.xcent"), "--generate-entitlement-der", "/tmp/aProject.dst/usr/local/bin/Tool"]) - } - } - } } }