[AMDGPU] Fix code object version not being set to 'none' (#135036)

Summary:
Previously, we removed the special handling for the code object version
global. I erroneously thought that this meant we cold get rid of this
weird `-Xclang` option. However, this also emits an LLVM IR module flag,
which will then cause linking issues.
This commit is contained in:
Joseph Huber
2025-04-10 11:31:21 -05:00
committed by GitHub
parent f2ff298867
commit 2f41fa387d
7 changed files with 38 additions and 3 deletions

View File

@@ -215,6 +215,8 @@ function(_get_common_compile_options output_var flags)
if(LIBC_CUDA_ROOT)
list(APPEND compile_options "--cuda-path=${LIBC_CUDA_ROOT}")
endif()
elseif(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
list(APPEND compile_options "SHELL:-Xclang -mcode-object-version=none")
endif()
endif()
set(${output_var} ${compile_options} PARENT_SCOPE)