zephyr/cmake/compiler/clang
Tom Hughes b6766aeb6b cmake: compiler: Remove -fshort-enums
"-fshort-enums" changes the ABI. It's not enabled for gcc, so it's not
clear why it's enabled for clang (only ARM) and armclang, other than it
looks like some users of these toolchains may be linking against code
that is compiled with "-fshort-enums".

As an example, when compiling with clang, CONFIG_LTO, and a toolchain
built without "-fshort-enums", the linker warns:

ld.lld: error: linking module flags 'min_enum_size': IDs have
conflicting values in
'/usr/armv7m-cros-eabi/usr/lib/libc++_static.a(string.cpp.o at 784090)'
and 'ld-temp.o'

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-06-06 11:52:22 +02:00
..
compiler_flags.cmake toolchain: clang: compiler opt: -Ofast -> -O3 -ffast-math 2025-05-23 17:41:40 -04:00
generic.cmake
target_arm64.cmake
target_arm.cmake
target.cmake cmake: compiler: Remove -fshort-enums 2025-06-06 11:52:22 +02:00