Skip to content

Commit c56281a

Browse files
committed
ProcessTests.uncaughtSignal(): Pin arch and deployment target.
rdar://179852205
1 parent c70f28f commit c56281a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Tests/SWBUtilTests/ProcessTests.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,15 @@ fileprivate struct ProcessTests {
130130
}
131131
"""
132132
try source.write(to: URL(fileURLWithPath: mainCPath), atomically: true, encoding: .utf8)
133-
let _ = try await runHostProcess(["clang", "-o", exePath, mainCPath])
133+
var clangArgs = ["clang", "-o", exePath, mainCPath]
134+
#if os(macOS)
135+
// Pin arch + deployment target so the binary can exec on CI hosts.
136+
if let hostArch = Architecture.host.stringValue {
137+
clangArgs += ["-arch", hostArch]
138+
}
139+
clangArgs += ["-mmacosx-version-min=26.0"]
140+
#endif
141+
let _ = try await runHostProcess(clangArgs)
134142

135143
do {
136144
let result = try await Process.getOutput(url: URL(fileURLWithPath: exePath), arguments: [])

0 commit comments

Comments
 (0)