Created
May 23, 2020 01:02
-
-
Save jessestricker/517171bee3e6f0877e896d0b36b723d0 to your computer and use it in GitHub Desktop.
CMake Toolchain File for LLVM, using Clang, libc++, lld and LTO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(flags "-flto") | |
set(c_flags "") | |
set(cxx_flags "-stdlib=libc++") | |
set(link_flags "-fuse-ld=lld") | |
set(CMAKE_C_COMPILER clang) | |
set(CMAKE_CXX_COMPILER clang++) | |
set(CMAKE_C_FLAGS_INIT "${c_flags} ${flags}") | |
set(CMAKE_CXX_FLAGS_INIT "${cxx_flags} ${flags}") | |
set(CMAKE_EXE_LINKER_FLAGS_INIT "${link_flags}") | |
set(CMAKE_MODULE_LINKER_FLAGS_INIT "${link_flags}") | |
set(CMAKE_SHARED_LINKER_FLAGS_INIT "${link_flags}") | |
set(CMAKE_STATIC_LINKER_FLAGS_INIT "${link_flags}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment