Commit 7e9b40f
committed
cmake: linker: lld: Do not link libc when minimal libc is used
When LLVM linker is used, the toolchain-provided C standard library is
always linked, even when the Zephyr minimal libc is selected, because `c`
is unconditionally specified in `link_order_library`, which causes `-lc` to
be specified in the linker flags.
This commit adds a check to ensure that `-lc` is not specified when the
Zephyr minimal libc is selected because it is a standalone C standard
library and it does not make sense to link two C standard libraries at
once.
Signed-off-by: Stephanos Ioannidis <[email protected]>1 parent 5ecf73b commit 7e9b40f
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments