Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/helpers/native.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ end

function GPUCompiler.mcgen(@nospecialize(job::NativeCompilerJob), mod::LLVM.Module,
format=LLVM.API.LLVMAssemblyFile)
if job.config.params.relocations !== :bake
# objects only exist to be loaded into `load`'s ORC JIT, so always emit them with the
# JIT's target machine: the default one uses the small code model with static
# relocations, whose 32-bit absolute references to e.g. constant pools cannot reach
# the addresses the JIT loads code at (and, on Windows, it emits COFF where ORC wants ELF)
if job.config.params.relocations !== :bake || format == LLVM.API.LLVMObjectFile
target = job.config.target
@dispose tm=JITTargetMachine(GPUCompiler.llvm_triple(target), target.cpu,
target.features) begin
Expand Down