fix(hw-oracle): select the AMDGPU ELF emulation when linking kernels
LLD built for a MinGW host runs the COFF linker when ld.lld gets no -m option, so it rejects the AMDGPU object with "unknown file type" and the hardware_oracle test fails on Windows with WinLibs LLVM in PATH. Passing -m elf64_amdgpu selects the ELF linker on every host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
787239eca5
commit
a83bfa6813
|
|
@ -72,7 +72,7 @@ def assemble(body, work, wave64, *, ieee, denorm32, denorm16, dx10_clamp, round3
|
|||
text = text.replace(key, value)
|
||||
(work / "k.s").write_text(text)
|
||||
subprocess.run([tool("clang"), "-x", "assembler", "-target", "amdgcn-amd-amdhsa", f"-mcpu={target()}", *(["-mwavefrontsize64"] if wave64 else []), "-c", str(work / "k.s"), "-o", str(work / "k.o")], check=True)
|
||||
subprocess.run([tool("ld.lld"), "-shared", str(work / "k.o"), "-o", str(work / "k.co")], check=True)
|
||||
subprocess.run([tool("ld.lld"), "-m", "elf64_amdgpu", "-shared", str(work / "k.o"), "-o", str(work / "k.co")], check=True)
|
||||
return work / "k.co"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue