Skip to content

Commit

Permalink
Use default arguments for amdclang that match hipcc (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawruble13 authored Mar 13, 2024
1 parent e2c57b4 commit e25052a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions toolchain-linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ else()
endif()

if (NOT DEFINED ENV{CXX})
set(CMAKE_CXX_COMPILER "${rocm_bin}/amdclang++")
set(CMAKE_CXX_COMPILER "${rocm_bin}/amdclang++" CACHE PATH "Path to the C++ compiler")
set(CMAKE_CXX_FLAGS "-mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false")
else()
set(CMAKE_CXX_COMPILER "$ENV{CXX}")
set(CMAKE_CXX_COMPILER "$ENV{CXX}" CACHE PATH "Path to the C++ compiler")
endif()

if (NOT DEFINED ENV{CC})
set(CMAKE_C_COMPILER "${rocm_bin}/amdclang")
set(CMAKE_C_COMPILER "${rocm_bin}/amdclang" CACHE PATH "Path to the C compiler")
set(CMAKE_CXX_FLAGS "-mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false")
else()
set(CMAKE_C_COMPILER "$ENV{CC}")
set(CMAKE_C_COMPILER "$ENV{CC}" CACHE PATH "Path to the C compiler")
endif()

0 comments on commit e25052a

Please sign in to comment.