-
Notifications
You must be signed in to change notification settings - Fork 71
refactor(cmake): clean up toolchain and CMakeLists separation #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
aa44d24
refactor(cmake): clean up toolchain and CMakeLists separation
16bit-ykiko c8f8628
refactor(cmake): clean up build system and add ccache support
16bit-ykiko 156aa38
feat(cmake): add release packaging with symbol separation
16bit-ykiko 6706e24
refactor(cmake): extract release.cmake, use GLOB for sources
16bit-ykiko 40de053
fix(ci): pass CLICE_ENABLE_BENCHMARK to benchmark workflow
16bit-ykiko 7d672a0
fix(ci): stop sccache server before pixi cleanup on Windows
16bit-ykiko 044bfc2
fix(cmake): address CodeRabbit review issues
16bit-ykiko 2cf48c8
fix(ci): stop sccache server after all steps to prevent EBUSY on Windows
16bit-ykiko ad37194
fix(ci): stop sccache before zero-stats for clean initial state
16bit-ykiko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,39 @@ | ||
| cmake_minimum_required(VERSION 3.30) | ||
|
|
||
| set(CMAKE_C_COMPILER clang CACHE STRING "C compiler") | ||
| set(CMAKE_CXX_COMPILER clang++ CACHE STRING "C++ compiler") | ||
| set(AR_PROGRAM_NAME "llvm-ar") | ||
| set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Executable linker flags") | ||
| set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Shared library linker flags") | ||
| set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "Module linker flags") | ||
| set(CMAKE_C_COMPILER clang CACHE STRING "") | ||
| set(CMAKE_CXX_COMPILER clang++ CACHE STRING "") | ||
|
|
||
| if(WIN32) | ||
| set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" CACHE STRING "MSVC runtime") | ||
| endif() | ||
|
|
||
| find_program(LLVM_AR_PATH ${AR_PROGRAM_NAME}) | ||
| find_program(LLVM_AR_PATH "llvm-ar") | ||
| if(LLVM_AR_PATH) | ||
| set(CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "Archiver") | ||
| set(CMAKE_C_COMPILER_AR "${LLVM_AR_PATH}" CACHE FILEPATH "C archiver") | ||
| set(CMAKE_CXX_COMPILER_AR "${LLVM_AR_PATH}" CACHE FILEPATH "C++ archiver") | ||
| set(CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "") | ||
| set(CMAKE_C_COMPILER_AR "${LLVM_AR_PATH}" CACHE FILEPATH "") | ||
| set(CMAKE_CXX_COMPILER_AR "${LLVM_AR_PATH}" CACHE FILEPATH "") | ||
| endif() | ||
|
|
||
| find_program(LLVM_RANLIB_PATH "llvm-ranlib") | ||
| if(LLVM_RANLIB_PATH) | ||
| set(CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "Ranlib") | ||
| set(CMAKE_C_COMPILER_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "C ranlib") | ||
| set(CMAKE_CXX_COMPILER_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "C++ ranlib") | ||
| set(CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "") | ||
| set(CMAKE_C_COMPILER_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "") | ||
| set(CMAKE_CXX_COMPILER_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "") | ||
| endif() | ||
|
|
||
| find_program(LLVM_NM_PATH "llvm-nm") | ||
| if(LLVM_NM_PATH) | ||
| set(CMAKE_NM "${LLVM_NM_PATH}" CACHE FILEPATH "Symbol lister") | ||
| set(CMAKE_NM "${LLVM_NM_PATH}" CACHE FILEPATH "") | ||
| endif() | ||
|
|
||
| find_program(LLVM_RC_PATH "llvm-rc") | ||
| if(LLVM_RC_PATH) | ||
| set(CMAKE_RC_COMPILER "${LLVM_RC_PATH}" CACHE FILEPATH "Resource compiler") | ||
| set(CMAKE_RC_COMPILER "${LLVM_RC_PATH}" CACHE FILEPATH "") | ||
| endif() | ||
|
|
||
| if(WIN32) | ||
| set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" CACHE STRING "") | ||
| set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld-link") | ||
| set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld-link") | ||
| set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld-link") | ||
| else() | ||
| set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld") | ||
| set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld") | ||
| set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld") | ||
| endif() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.