[BUILD] Support clang++ compiler (#1316)
* [BUILD] Support clang++ compiler
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
* [BUILD] Enable check_symbol_exists for BFD and clang++
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
* [BUILD] Define default C compiler
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
---------
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
[ROCm/rccl commit: d3012d3307]
This commit is contained in:
@@ -16,3 +16,14 @@ if (NOT DEFINED ENV{CXXFLAGS})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ENV{CC})
|
||||
set(CMAKE_C_COMPILER "${rocm_bin}/amdclang" CACHE PATH "Path to the C compiler")
|
||||
else()
|
||||
set(CMAKE_C_COMPILER "$ENV{CC}" CACHE PATH "Path to the C compiler")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ENV{CFLAGS})
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -O1")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user