Skip to content

Commit 2211935

Browse files
ozhurakinashif
authored andcommitted
cmake: clang: Make clang pick -T option on linking
When linking, clang doesn't pick -T for some reason and complains, while -Wl,-T works for both, gcc and clang. Signed-off-by: Oleg Zhurakivskyy <[email protected]>
1 parent 4596e15 commit 2211935

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ zephyr_ld_option_ifdef(
402402
)
403403

404404
get_property(TOPT GLOBAL PROPERTY TOPT)
405-
set_ifndef( TOPT -T)
405+
set_ifndef( TOPT -Wl,-T) # clang doesn't pick -T for some reason and complains,
406+
# while -Wl,-T works for both, gcc and clang
406407

407408
if(NOT CONFIG_NATIVE_APPLICATION)
408409
# Funny thing is if this is set to =error, some architectures will

0 commit comments

Comments
 (0)