Skip to content

Commit

Permalink
Improve the handling of CMake deduplication (#1450)
Browse files Browse the repository at this point in the history
Certain CMake functions deduplicates arguments by default. For example, if we
have two `target_link_options` with both `-Xoffload-linker -opt-A` and then
`-Xoffload-linker -opt-B`, the final link command would be `-Xoffload-linker
-opt-A -opt-B`, which is not what we want.
  • Loading branch information
shiltian authored Dec 11, 2024
1 parent 8e9fcf1 commit 7386fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ else()
message(STATUS "Building shared RCCL library")
endif()
if (HAVE_KERNARG_PRELOAD)
target_link_options(rccl PRIVATE -Xoffload-linker -mllvm=-amdgpu-kernarg-preload-count=16)
target_link_options(rccl PRIVATE "SHELL:-Xoffload-linker -mllvm=-amdgpu-kernarg-preload-count=16")
endif()

if(ENABLE_MSCCLPP)
Expand Down

0 comments on commit 7386fac

Please sign in to comment.