-
Notifications
You must be signed in to change notification settings - Fork 174
LLVM support #922
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
Closed
Closed
LLVM support #922
Conversation
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
Member
nashif
commented
May 20, 2025
- ci: Restructure toolchain build process
- scripts: Rework POSIX setup script for restructured bundle
- scripts: Rework Windows setup script for restructured bundle
- cmake: Rework CMake scripts for restructured bundle
- ci: Download host-specific artifacts when building distribution bundle
- ci: Use 'zephyr-gnu' toolchain variant for testing
- ci: Run tests with Zephyr collab-sdk-0.18-dev branch
- Add LLVM submodule
- llvm: Pull Arm LLVM ET 19.1.1 patches
- scripts: Add initial Zephyr SDK LLVM build script
- ci: Use sdk-build v1.3.4
- ci: Add LLVM toolchain build job
- ci: Remove obsolete clean-up tasks
- ci: Remove legacy GitHub-hosted macOS runner setup tasks
- ci: Remove unneeded sudo operations
- ci: Use CI image 'main' for running Linux tests
- ci: Force Python 3.10 for testing
- ci: Use sdk-build v1.3.8
- ci: Use SDK build image MinGW-w64 installation
- cmake: Add LLVM toolchain support
- cmake: gnu: Set TOOLCHAIN_HAS_GLIBCXX
- cmake: llvm: Set TOOLCHAIN_HAS_LIBCXX
- template_setup_posix: Add LLVM toolchain setup option
- template_setup_win: Add LLVM toolchain setup option
- ci: Disable LLVM tests on qemu_cortex_a53
- ci: Disable LLVM tests on mps3/an547
- ci: Disable LLVM tests on qemu_cortex_m0
- ci: Add test job debug steps
- ci: Fix Windows test name
- ci: Skip testing LLVM on Windows
- ci: Disable intel_ace30_ptl testing
- Revert "ci: Install [email protected] for macOS"
- release-noes: Add release notes for 0.18.0-alpha1
- VERSION: Bump to 0.18.0-alpha1
- ci: release: Update toolchain archive names
- scripts: llvm: Add initial RISC-V support
- scripts: llvm: Add RV32I multi-libs
- scripts: llvm: Add RV32E multi-libs
- scripts: llvm: Add RV64I multi-libs
- scripts: llvm: Disable Picolibc FP exception and rounding tests
- cmake: Add LLVM RISC-V target
- scripts: llvm: Add RV32I multi-lib alternate mappings
- scripts: llvm: Add RV32E multi-lib alternate mappings
- scripts: llvm: Add RV64I multi-lib alternate mappings
- ci: Add RISC-V platforms for LLVM testing
- ci: Disable LLVM qemu_riscv32 testing
- ci: Disable LLVM qemu_riscv32e testing
- ci: Disable LLVM qemu_riscv64 testing
- release-notes: Add release notes for 0.18.0-alpha2
This commit restructures the CI toolchain and distribution bundle build process in preparation for adding Clang/LLVM toolchain build process. The changes introduced in this commit are as follows: * Prefix all existing GNU toolchain build steps with `gnu`. * Relocate GNU toolchain directories to `gnu/` in the distribution bundle. * Rename "full distribution bundle" to "GNU distribution bundle" with `_gnu` suffix in the archive name. * Rename `sdk_toolchains` file, which contains the list of all available GNU toolchains to `sdk_gnu_toolchains`. * Relocate host tools root directory to `hosttools/` in the distribution bundle. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit reworks the POSIX Zephyr SDK distribution bundle setup script to work with the restructured distribution bundle. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit reworks the Windows Zephyr SDK distribution bundle setup script to work with the restructured distribution bundle. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit reworks the CMake scripts to work with the restructured distribution bundle directory structure. Signed-off-by: Stephanos Ioannidis <[email protected]>
With the GitHub `download-artifact` action v4, it is now possible to specify a glob pattern for filtering the artifacts to be downloaded. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CI workflow to use the `zephyr-gnu` toolchain variant for testing the Zephyr SDK GNU toolchains. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CI workflow to run tests using the Zephyr `collab-sdk-0.18-dev` branch. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the LLVM Project submodule in preparation for implementing Clang/LLVM toolchain support in the Zephyr SDK. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit pulls the LLVM patches from the LLVM Embedded Toolchain for Arm 19.1.1 release. These patches are sourced from `patches/llvm-project/` directory under the LLVM Embedded Toolchain for Arm source tree. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the Zephyr SDK LLVM build script that builds the Clang/LLVM toolchain as well as the compiler runtime and C/C++ standard libraries for Arm architecture. The build script is based on the LLVM Embedded Toolchain for Arm [1] version 19.1.1 build script. [1] https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CI workflow to use the SDK build image v1.3.4, which includes the up-to-date CMake, ninja and QEMU required for building LLVM. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds a job that builds the Zephyr SDK LLVM toolchain and adds a new LLVM distribution bundle. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit removes the now-obsolete tasks that clean up the workspace directories. These clean-up tasks were necessary back when the zephyr-runner was not fully ephemeral; zephyr-runner v2 is fully ephemeral and these hacks are no longer necessary. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit removes the legacy code that installs the additional packages that are not available in GitHub-hosted macOS runners. This was necessary back when the zephyr-runner did not have macOS support and the macOS toolchain build workflows had to run on the GItHub-hosted runners. That is no longer the case and the SDK CI workflow, in its current state, is no longer compatible with the GitHub-hosted macOS runners; so, there is no point in keeping this anymore. Signed-off-by: Stephanos Ioannidis <[email protected]>
The jobs running inside the `sdk-build` Docker image currently run as `root` user by default, so there is no need to add `sudo` to privileged operations. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CI workflow to run Linux tests using the `main` tag of the CI image instead of `master` tag, which has not been updated in a while. Signed-off-by: Stephanos Ioannidis <[email protected]>
Python 3.10 is currently the minimum Python version supported by Zephyr and the version intended to be used with Zephyr SDK (note that `gdb-py` links against `libpython3.10`), so test with Python 3.10 on all host operating sytems. As part of this, virtual environment usage is forced on Linux hosts in order to ensure that the correct version and installation of Python is used. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CI workflow to use the SDK build image v1.3.8, which includes more up-to-date MinGW-w64 toolchain (v12.0.0) with win32 and posix thread model support. The posix thread model support is necessary for building Windows LLVM, which makes use of `std::thread`, which depends on pthread. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CI workflow to use the more up-to-date MinGW-w64 toolchain (MinGW 12.0.0, Binutils 2.42, GCC 13.2.0) from the SDK build Docker image instead of installing the outdated distro default version. Note that MinGW 12.0.0 defaults to UCRT on Windows. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the support file for the `zephyr-llvm` toolchain variant. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the GNU toolchain CMake script to set `TOOLCHAIN_HAS_GLIBCXX` to indicate that libstdc++ aka. GNU C++ Standard Library is supported. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the LLVM toolchain CMake script to set `TOOLCHAIN_HAS_LIBCXX` to indicate that libc++ aka. LLVM C++ Standard Library is supported. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the POSIX distribution bundle setup script to handle LLVM toolchain installation. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the Windows distribution bundle setup script to handle LLVM toolchain installation. Signed-off-by: Stephanos Ioannidis <[email protected]>
There are currently issues building `qemu_cortex_a53` tests with LLVM. Revert this commit when the LLVM support for this platform is fixed on Zephyr side. Signed-off-by: Stephanos Ioannidis <[email protected]>
There are currently issues building `mps3/an547` tests with LLVM. Revert this commit when the LLVM support for this platform is fixed on Zephyr side. Signed-off-by: Stephanos Ioannidis <[email protected]>
There are currently issues building `qemu_cortex_m0` tests with LLVM. Revert this commit when the LLVM support for this platform is fixed on Zephyr side. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit introduces new debug points `test-pre` and `test-post` that can be used to start a remote debug session before and after the Twister run, respectively. Signed-off-by: Stephanos Ioannidis <[email protected]>
The Windows test runs on `zephyr-runner-v2-windows-x64-2xlarge`, which is Windows Server 2022, not 2019. Signed-off-by: Stephanos Ioannidis <[email protected]>
Do not run distribution bundle tests for Zephyr SDK LLVM toolchain on Windows because there are known issues causing strange CMake behaviours and subsequent build failures (see GitHub issue zephyrproject-rtos#831). Revert this commit when the above issue is fixed. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit disables the testing of `xtensa-intel_ace30_ptl_zephyr-elf` toolchain because there are known issues causing build failures on this platform. Revert this commit when this platform is fixed. Signed-off-by: Stephanos Ioannidis <[email protected]>
This reverts commit ba68e7f because the [email protected] package has been added to the macOS runner image. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the release notes for the Zephyr SDK 0.18.0-alpha1 release. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit bumps the Zephyr SDK version to 0.18.0-alpha1. Signed-off-by: Stephanos Ioannidis <[email protected]>
Toolchain archives now contain `gnu` or `llvm` in their name, depending on the type of toolchain. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the initial RISC-V architecture support to the Clang/LLVM build script. Note that only the most basic multi-lib variant (`rvX_zicsr_zifencei`) for each base ISA is built at this time. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the following "common" RV32I multi-lib variants, based on the list of the GCC RV32I multi-libs (gcc/config/riscv/t-zephyr): rv32i_zicsr_zifencei/ilp32 rv32im_zicsr_zifencei/ilp32 rv32im_zicsr_zifencei_zba_zbb_zbc_zbs/ilp32 rv32imac_zicsr_zifencei/ilp32 rv32imafc_zicsr_zifencei/ilp32f rv32imfc_zicsr_zifencei/ilp32f rv32imafd_zicsr_zifencei/ilp32d rv32if_zicsr_zifencei/ilp32f Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the following "common" RV32E multi-lib variants, based on the list of the GCC RV32E multi-libs (gcc/config/riscv/t-zephyr): rv32e_zicsr_zifencei/ilp32e rv32em_zicsr_zifencei/ilp32e rv32emc_zicsr_zifencei/ilp32e rv32emc_zicsr_zifencei_zba_zbb_zbc_zbs/ilp32e rv32emc_zicsr/ilp32e rv32emc_zicsr_zba_zbb_zbc_zbs/ilp32e Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the following "common" RV64I multi-lib variants, based on the list of the GCC RV64I multi-libs (gcc/config/riscv/t-zephyr): rv64i_zicsr_zifencei/lp64 rv64im_zicsr_zifencei/lp64 rv64im_zicsr_zifencei_zba_zbb_zbc_zbs/lp64 rv64imac_zicsr_zifencei/lp64 rv64imac_zicsr_zifencei_zba_zbb_zbc_zbs/lp64 rv64imafdc_zicsr_zifencei/lp64d rv64imafd_zicsr_zifencei/lp64d rv64imfc_zicsr_zifencei/lp64f rv64imfc_zicsr_zifencei_zba_zbb_zbc_zbs/lp64f Signed-off-by: Stephanos Ioannidis <[email protected]>
LLVM compiler-rt does not currently support exceptions and rounding modes for computations on the types that are emulated in software. For more details, refer to the GitHub issue zephyrproject-rtos#838. Revert this commit when this issue is fixed in the compiler-rt. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit updates the CMake target specification to handle the RISC-V architecture. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the alternate RV32I multi-lib mappings, based on the list of the GCC RV32I multi-lib mappings (gcc/config/riscv/t-zephyr). Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the alternate RV32E multi-lib mappings, based on the list of the GCC RV32E multi-lib mappings (gcc/config/riscv/t-zephyr). Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the alternate RV64I multi-lib mappings, based on the list of the GCC RV64I multi-lib mappings (gcc/config/riscv/t-zephyr). Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the RV32I, RV32E and RV64I Zephyr boards for testing the Clang/LLVM toolchain. Signed-off-by: Stephanos Ioannidis <[email protected]>
There are issues building tests for qemu_riscv32 using the LLVM toolchain. Revert this commit once these issues are fixed on the Zephyr side. Signed-off-by: Stephanos Ioannidis <[email protected]>
There are issues building tests for qemu_riscv32e using the LLVM toolchain. Revert this commit once these issues are fixed on the Zephyr side. Signed-off-by: Stephanos Ioannidis <[email protected]>
There are issues building tests for qemu_riscv64 using the LLVM toolchain. Revert this commit once these issues are fixed on the Zephyr side. Signed-off-by: Stephanos Ioannidis <[email protected]>
This commit adds the release notes for the Zephyr SDK 0.18.0-alpha2 release. Signed-off-by: Stephanos Ioannidis <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.