cmake:fix sim gc-section option build failed
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
da19d79656
commit
8da0206a40
|
@ -90,6 +90,10 @@ if(CONFIG_SCHED_GCOV_ALL)
|
|||
add_compile_options(-fprofile-generate -ftest-coverage)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SCHED_GPROF_ALL OR CONFIG_SIM_GPROF)
|
||||
add_compile_options(-pg)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SIM_ASAN)
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
|
@ -188,5 +192,6 @@ endif()
|
|||
if(APPLE)
|
||||
add_link_options(-Wl,-dead_strip)
|
||||
else()
|
||||
add_link_options(-Wl,--gc-sections)
|
||||
add_link_options(-Wl,-Ttext-segment=0x40000000)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue