forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llvm: Add support for selecting runtime library
This patch adds Kconfig options to select either GNU libgcc or LLVM compiler-rt. The 'rtlib' flag is provided in a config file, so this patch introduces 'clang_libgcc.cfg' and 'clang_compiler_rt.cfg' which enable appropriate library. The file is selected by concatenating the 'clang_' prefix with library name. Signed-off-by: Patryk Duda <[email protected]>
- Loading branch information
1 parent
7c76464
commit 4b94fc3
Showing
9 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) 2023 The ChromiumOS Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--rtlib=compiler-rt |
File renamed without changes.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) 2023 The ChromiumOS Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config COMPILER_RT_SUPPORTED | ||
bool | ||
default y | ||
depends on "${ZEPHYR_TOOLCHAIN_VARIANT}" = "llvm" | ||
help | ||
Selected when the compiler supports compiler-rt runtime library. | ||
|
||
choice RTLIB_IMPLEMENTATION | ||
prompt "Runtime library implementation" | ||
default LIBGCC_RTLIB | ||
|
||
config LIBGCC_RTLIB | ||
bool "GNU Libgcc" | ||
help | ||
Use libgcc as a runtime library. | ||
|
||
config COMPILER_RT_RTLIB | ||
bool "LLVM compiler-rt" | ||
depends on COMPILER_RT_SUPPORTED | ||
help | ||
Use LLVM compiler-rt as a runtime library. | ||
|
||
endchoice |
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