aboutsummaryrefslogtreecommitdiffstats
path: root/clang.toolchain
blob: 71d241b34f648efa16146c115c6715f0ffaeb452 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
set(CMAKE_C_COMPILER clang-14)
set(CMAKE_CXX_COMPILER clang++-14)
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld -rdynamic")
set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld")
set(CMAKE_C_STANDARD_LIBRARIES "-lc -lm")
set(CMAKE_CXX_STANDARD_LIBRARIES "-lc -lm")
if (CCACHE_PATH)
    set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PATH}"  CACHE STRING "C++ compiler launcher")
    set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}" CACHE STRING "C compiler launcher")

    # TODO: change ydb/.github/prewarm/build.sh in order to remove the difference with non-cache builds
    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -UNDEBUG"  CACHE STRING "C++ compiler flags")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -UNDEBUG" CACHE STRING "C compiler flags")
else()
    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -UNDEBUG"  CACHE STRING "C++ compiler flags")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -UNDEBUG" CACHE STRING "C compiler flags")
endif()
set(ENV{CC} clang-14)
set(ENV{CXX} clang++-14)