Skip to content

Commit fcb32fe

Browse files
committed
Fix issue causing QNX plugin to create "null.o" in the current directory
Send that to /dev/null instead
1 parent 01b04df commit fcb32fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SWBQNXPlatform/QNXSDP.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct QNXSDP: Sendable {
3939

4040
self.version = try await {
4141
if let compilerPath = hostPath?.join("usr").join("bin").join(host.imageFormat.executableName(basename: "qcc")) {
42-
let output = try await Process.getMergedOutput(url: URL(fileURLWithPath: compilerPath.str), arguments: ["-dM", "E", "-x", "c", "-c", Path.null.str], environment: environment)
42+
let output = try await Process.getMergedOutput(url: URL(fileURLWithPath: compilerPath.str), arguments: ["-dM", "E", "-x", "c", "-c", Path.null.str, "-o", Path.null.str], environment: environment)
4343
if output.exitStatus.isSuccess, !output.output.isEmpty {
4444
let prefix = "#define __QNX__ "
4545
if let versionString = String(decoding: output.output, as: UTF8.self).split(separator: "\n").map(String.init).first(where: { $0.hasPrefix(prefix) })?.dropFirst(prefix.count), let version = Int(versionString) {

0 commit comments

Comments
 (0)