From aad983cf40dad209ccc79b1e5ef4531e1b4d4ca7 Mon Sep 17 00:00:00 2001 From: Guillaume Wenzek Date: Fri, 16 Sep 2022 22:21:14 +0200 Subject: sanitize qualified name for nvptx backend --- src/target.zig | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/target.zig') 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 { -- cgit v1.2.3