aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
diff options
context:
space:
mode:
authorGuillaume Wenzek <gwenzek@users.noreply.github.com>2022-09-16 22:21:14 +0200
committerAndrew Kelley <andrew@ziglang.org>2022-10-15 10:39:19 -0700
commitaad983cf40dad209ccc79b1e5ef4531e1b4d4ca7 (patch)
treefc56b5007f1a66e8b1e693e33518a9c937140435 /src/target.zig
parent92a857b76c9a6ff7b885b623ae86844ca77ed646 (diff)
downloadzig-aad983cf40dad209ccc79b1e5ef4531e1b4d4ca7.tar.gz
zig-aad983cf40dad209ccc79b1e5ef4531e1b4d4ca7.zip
sanitize qualified name for nvptx backend
Diffstat (limited to 'src/target.zig')
-rw-r--r--src/target.zig13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/target.zig b/src/target.zig
index 2c05a80258..01db8555da 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -411,13 +411,12 @@ pub fn classifyCompilerRtLibName(target: std.Target, name: []const u8) CompilerR
}
pub fn hasDebugInfo(target: std.Target) bool {
- return switch (target.cpu.arch) {
- .nvptx, .nvptx64 => {
- // TODO: not sure to test "ptx >= 7.5" with featureset
- return std.Target.nvptx.featureSetHas(target.cpu.features, .ptx75);
- },
- else => true
- };
+ if (target.cpu.arch.isNvptx()) {
+ // TODO: not sure how to test "ptx >= 7.5" with featureset
+ return std.Target.nvptx.featureSetHas(target.cpu.features, .ptx75);
+ }
+
+ return true;
}
pub fn defaultCompilerRtOptimizeMode(target: std.Target) std.builtin.Mode {