kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/macos_build_error' into 'master'
build: fixed missing condition preventing linking libgcc when building using clang for linux target See merge request espressif/esp-idf!24250pull/10533/head^2
commit
c48c6d2e6c
|
@ -224,11 +224,10 @@ endif()
|
|||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
list(APPEND compile_options "-fno-use-cxa-atexit")
|
||||
if(CONFIG_COMPILER_RT_LIB_GCCLIB)
|
||||
list(APPEND link_options "-rtlib=libgcc")
|
||||
elseif(CONFIG_COMPILER_RT_LIB_CLANGRT)
|
||||
list(APPEND link_options "-rtlib=compiler-rt")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(COMPILER_RT_LIB_NAME)
|
||||
list(APPEND link_options "-rtlib=${CONFIG_COMPILER_RT_LIB_NAME}")
|
||||
endif()
|
||||
|
||||
# For the transition period from 32-bit time_t to 64-bit time_t,
|
||||
|
|
9
Kconfig
9
Kconfig
|
@ -514,23 +514,30 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
|||
choice COMPILER_RT_LIB
|
||||
prompt "Compiler runtime library"
|
||||
default COMPILER_RT_LIB_CLANGRT if IDF_TOOLCHAIN_CLANG
|
||||
default COMPILER_RT_LIB_HOST if IDF_TARGET_LINUX
|
||||
default COMPILER_RT_LIB_GCCLIB
|
||||
help
|
||||
Select runtime library to be used by compiler.
|
||||
- GCC toolchain supports libgcc only.
|
||||
- Clang allows to choose between libgcc or libclang_rt.
|
||||
- For host builds ("linux" target), uses the default library.
|
||||
|
||||
config COMPILER_RT_LIB_GCCLIB
|
||||
depends on !IDF_TARGET_LINUX
|
||||
bool "libgcc"
|
||||
config COMPILER_RT_LIB_CLANGRT
|
||||
depends on IDF_TOOLCHAIN_CLANG
|
||||
depends on IDF_TOOLCHAIN_CLANG && !IDF_TARGET_LINUX
|
||||
bool "libclang_rt"
|
||||
config COMPILER_RT_LIB_HOST
|
||||
depends on IDF_TARGET_LINUX
|
||||
bool "Host"
|
||||
endchoice
|
||||
|
||||
config COMPILER_RT_LIB_NAME
|
||||
string
|
||||
default "clang_rt.builtins" if COMPILER_RT_LIB_CLANGRT
|
||||
default "gcc" if COMPILER_RT_LIB_GCCLIB
|
||||
default "" if COMPILER_RT_LIB_HOST
|
||||
|
||||
endmenu # Compiler Options
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue