| author | |
| committer | |
| log | f38a28a6261e6a3a5676d0438a6d5c7b6047ac52 |
| tree | e0e109ce478646f1fab46c06c51d86cde10cebaf |
| parent | af6670c40348bb0e75e48b446a06886f37eb2e4a |
| signature | Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM |
2 files changed, 9 insertions(+), 6 deletions(-)
src/link/NvPtx.zig+3-6| ... | ... | @@ -53,6 +53,7 @@ pub fn createEmpty( |
| 53 | 53 | .tag = .nvptx, |
| 54 | 54 | .comp = comp, |
| 55 | 55 | .emit = emit, |
| 56 | .zcu_object_sub_path = emit.sub_path, | |
| 56 | 57 | .gc_sections = options.gc_sections orelse false, |
| 57 | 58 | .print_gc_sections = options.print_gc_sections, |
| 58 | 59 | .stack_size = options.stack_size orelse 0, |
| ... | ... | @@ -116,11 +117,7 @@ pub fn flushModule(self: *NvPtx, arena: Allocator, tid: Zcu.PerThread.Id, prog_n |
| 116 | 117 | if (build_options.skip_non_native) |
| 117 | 118 | @panic("Attempted to compile for architecture that was disabled by build configuration"); |
| 118 | 119 | |
| 119 | // The code that was here before mutated the Compilation's file emission mechanism. | |
| 120 | // That's not supposed to happen in flushModule, so I deleted the code. | |
| 121 | _ = arena; | |
| 122 | _ = self; | |
| 123 | _ = prog_node; | |
| 124 | 120 | _ = tid; |
| 125 | @panic("TODO: rewrite the NvPtx.flushModule function"); | |
| 121 | ||
| 122 | try self.base.emitLlvmObject(arena, self.llvm_object, prog_node); | |
| 126 | 123 | } |
src/main.zig+6| ... | ... | @@ -3074,6 +3074,12 @@ fn buildOutputType( |
| 3074 | 3074 | |
| 3075 | 3075 | const target = main_mod.resolved_target.result; |
| 3076 | 3076 | |
| 3077 | if (target.cpu.arch.isNvptx()) { | |
| 3078 | if (emit_bin != .no and create_module.resolved_options.use_llvm) { | |
| 3079 | fatal("cannot emit PTX binary with the LLVM backend; only '-femit-asm' is supported", .{}); | |
| 3080 | } | |
| 3081 | } | |
| 3082 | ||
| 3077 | 3083 | if (target.os.tag == .windows and major_subsystem_version == null and minor_subsystem_version == null) { |
| 3078 | 3084 | major_subsystem_version, minor_subsystem_version = switch (target.os.version_range.windows.min) { |
| 3079 | 3085 | .nt4 => .{ 4, 0 }, |