mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_rom: support building for Linux target with Clang
This fixes passing -Wimplicit-fallthrough=0 flag to Clang, which it doesn't recognize, and is not necessary for this file. Also the flag is changed from PUBLIC to PRIVATE since it is necessary when compiling this component only.
This commit is contained in:
parent
e7e059cc0a
commit
fd1c213be4
@ -48,8 +48,11 @@ endfunction()
|
||||
|
||||
if(target STREQUAL "linux")
|
||||
# We need to disable some warnings due to the ROM code's printf implementation
|
||||
if(${CMAKE_CXX_COMPILER_VERSION} GREATER "7.0.0") # TODO: clang compatibility
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC -Wimplicit-fallthrough=0 -Wno-shift-count-overflow)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} GREATER "7.0.0")
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE -Wimplicit-fallthrough=0 -Wno-shift-count-overflow)
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # Clang or AppleClang
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-integer-overflow -Wno-shift-count-overflow)
|
||||
endif()
|
||||
else()
|
||||
target_linker_script(${COMPONENT_LIB} INTERFACE "${target}/${ld_folder}/${target}.rom.ld")
|
||||
|
Loading…
x
Reference in New Issue
Block a user