mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 14:44:32 +02:00
spi_flash: only add GCC-specific flags when building with GCC
This commit is contained in:
@@ -55,5 +55,9 @@ idf_component_register(SRCS "${srcs}"
|
|||||||
LDFRAGMENTS linker.lf)
|
LDFRAGMENTS linker.lf)
|
||||||
|
|
||||||
# Avoid cache miss by unexpected inlineing when built by -Os
|
# Avoid cache miss by unexpected inlineing when built by -Os
|
||||||
set_source_files_properties(${cache_srcs} PROPERTIES COMPILE_FLAGS
|
set_source_files_properties(${cache_srcs} PROPERTIES COMPILE_FLAGS "-fno-inline-functions")
|
||||||
"-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once")
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
|
# These flags are GCC specific
|
||||||
|
set_property(SOURCE ${cache_srcs} APPEND_STRING PROPERTY COMPILE_FLAGS
|
||||||
|
" -fno-inline-small-functions -fno-inline-functions-called-once")
|
||||||
|
endif()
|
||||||
|
Reference in New Issue
Block a user