mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
revive nvptx linkage
This commit is contained in:
parent
13541bc1c0
commit
ffd85ffcda
2 changed files with 9 additions and 6 deletions
|
|
@ -53,6 +53,7 @@ pub fn createEmpty(
|
|||
.tag = .nvptx,
|
||||
.comp = comp,
|
||||
.emit = emit,
|
||||
.zcu_object_sub_path = emit.sub_path,
|
||||
.gc_sections = options.gc_sections orelse false,
|
||||
.print_gc_sections = options.print_gc_sections,
|
||||
.stack_size = options.stack_size orelse 0,
|
||||
|
|
@ -116,11 +117,7 @@ pub fn flushModule(self: *NvPtx, arena: Allocator, tid: Zcu.PerThread.Id, prog_n
|
|||
if (build_options.skip_non_native)
|
||||
@panic("Attempted to compile for architecture that was disabled by build configuration");
|
||||
|
||||
// The code that was here before mutated the Compilation's file emission mechanism.
|
||||
// That's not supposed to happen in flushModule, so I deleted the code.
|
||||
_ = arena;
|
||||
_ = self;
|
||||
_ = prog_node;
|
||||
_ = tid;
|
||||
@panic("TODO: rewrite the NvPtx.flushModule function");
|
||||
|
||||
try self.base.emitLlvmObject(arena, self.llvm_object, prog_node);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3081,6 +3081,12 @@ fn buildOutputType(
|
|||
|
||||
const target = main_mod.resolved_target.result;
|
||||
|
||||
if (target.cpu.arch.isNvptx()) {
|
||||
if (emit_bin != .no and create_module.resolved_options.use_llvm) {
|
||||
fatal("cannot emit PTX binary with the LLVM backend; only '-femit-asm' is supported", .{});
|
||||
}
|
||||
}
|
||||
|
||||
if (target.os.tag == .windows and major_subsystem_version == null and minor_subsystem_version == null) {
|
||||
major_subsystem_version, minor_subsystem_version = switch (target.os.version_range.windows.min) {
|
||||
.nt4 => .{ 4, 0 },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue