-
Notifications
You must be signed in to change notification settings - Fork 15.5k
CMake cache file for building Pico SDK toolchain #113267
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
Open
petrhosek
wants to merge
1
commit into
llvm:main
Choose a base branch
from
petrhosek:clang-cmake-cache-pico
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # This file sets up a CMakeCache for the Pico SDK toolchain build. | ||
|
|
||
| set(CMAKE_BUILD_TYPE Release CACHE STRING "") | ||
|
|
||
| set(LLVM_TARGETS_TO_BUILD ARM;RISCV CACHE STRING "") | ||
| set(LLVM_ENABLE_PROJECTS clang;lld;llvm CACHE STRING "") | ||
| set(LLVM_ENABLE_RUNTIMES compiler-rt;libcxx;libc CACHE STRING "") | ||
|
|
||
| set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "") | ||
| set(CLANG_DEFAULT_LINKER lld CACHE STRING "") | ||
| set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "") | ||
| set(CLANG_DEFAULT_UNWINDLIB libunwind CACHE STRING "") | ||
|
|
||
| set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") | ||
| set(LLVM_TOOLCHAIN_TOOLS | ||
| llvm-ar | ||
| llvm-cov | ||
| llvm-objcopy | ||
| llvm-objdump | ||
| llvm-profdata | ||
| llvm-ranlib | ||
| llvm-readelf | ||
| llvm-readobj | ||
| llvm-size | ||
| llvm-strings | ||
| llvm-strip | ||
| llvm-symbolizer | ||
| CACHE STRING "") | ||
| set(LLVM_DISTRIBUTION_COMPONENTS | ||
| builtins | ||
| clang | ||
| clang-resource-headers | ||
| lld | ||
| runtimes | ||
| ${LLVM_TOOLCHAIN_TOOLS} | ||
| CACHE STRING "") | ||
|
|
||
| set(LLVM_BUILTIN_TARGETS armv6m-none-eabi;armv8m.main-none-eabi;riscv32-unknown-elf CACHE STRING "") | ||
| foreach(target ${LLVM_BUILTIN_TARGETS}) | ||
| set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "") | ||
| set(BUILTINS_${target}_CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "") | ||
| set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "") | ||
| endforeach() | ||
|
|
||
| set(BUILTINS_armv6m-none-eabi_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "") | ||
| set(BUILTINS_armv8m.main-none-eabi_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "") | ||
| set(BUILTINS_riscv32-unknown-elf_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "") | ||
| foreach(lang C;CXX;ASM) | ||
| set(BUILTINS_armv6m-none-eabi_CMAKE_${lang}_FLAGS "-march=armv6m -mcpu=cortex-m0plus -mfloat-abi=soft" CACHE STRING "") | ||
| set(BUILTINS_armv8m.main-none-eabi_CMAKE_${lang}_FLAGS "-march=armv8m.main+fp+dsp -mcpu=cortex-m33 -mfloat-abi=softfp" CACHE STRING "") | ||
| set(BUILTINS_riscv32-unknown-elf_CMAKE_${lang}_FLAGS "-march=rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb -mabi=ilp32" CACHE STRING "") | ||
| endforeach() | ||
|
|
||
| set(LLVM_RUNTIME_TARGETS armv6m-none-eabi;armv8m.main-none-eabi;riscv32-unknown-elf CACHE STRING "") | ||
| foreach(target ${LLVM_RUNTIME_TARGETS}) | ||
| set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "") | ||
| set(RUNTIMES_${target}_CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "") | ||
| set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "") | ||
| set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES libc;libcxx CACHE STRING "") | ||
| set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_CXX_ABI none CACHE STRING "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_WIDE_CHARACTERS OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_RTTI OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_THREADS OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "") | ||
| set(RUNTIMES_${target}_LIBCXX_SHARED_OUTPUT_NAME "c++-shared" CACHE STRING "") | ||
| set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") | ||
| set(RUNTIMES_${target}_RUNTIMES_USE_LIBC llvm-libc CACHE STRING "") | ||
| endforeach() | ||
|
|
||
| set(RUNTIMES_armv6m-none-eabi_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "") | ||
| set(RUNTIMES_armv8m.main-none-eabi_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "") | ||
| set(RUNTIMES_riscv32-unknown-elf_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "") | ||
| foreach(lang C;CXX;ASM) | ||
| # TODO: Use internal logging API instead of fprintf in libc++ | ||
| set(RUNTIMES_armv6m-none-eabi_CMAKE_${lang}_FLAGS "-march=armv6m -mcpu=cortex-m0plus -mfloat-abi=soft -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dfputs(string, stream)=puts(string)\" -D_LIBCPP_PRINT=1" CACHE STRING "") | ||
| set(RUNTIMES_armv8m.main-none-eabi_CMAKE_${lang}_FLAGS "-march=armv8m.main+fp+dsp -mcpu=cortex-m33 -mfloat-abi=softfp -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dfputs(string, stream)=puts(string)\" -D_LIBCPP_PRINT=1" CACHE STRING "") | ||
| set(RUNTIMES_riscv32-unknown-elf_CMAKE_${lang}_FLAGS "-march=rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb -mabi=ilp32 -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dfputs(string, stream)=puts(string)\" -D_LIBCPP_PRINT=1" CACHE STRING "") | ||
| endforeach() | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "internal" here mean?