zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit b3dc80a1e33cf78205666d01a6dcf53bd5a4698f (tree)
parent 85c6b0f0bcda2e3bb2dc5f3347e5c6712d268a39
Author: Guillaume Wenzek <gwenzek@users.noreply.github.com>
Date:   Thu,  1 Sep 2022 21:47:44 +0200

disable debug info for ptx<7.5

Diffstat:
Msrc/target.zig | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/target.zig b/src/target.zig @@ -411,8 +411,13 @@ pub fn classifyCompilerRtLibName(target: std.Target, name: []const u8) CompilerR } pub fn hasDebugInfo(target: std.Target) bool { - _ = target; - return true; + 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 + }; } pub fn defaultCompilerRtOptimizeMode(target: std.Target) std.builtin.Mode {