From 8f593f63577239d8275610494023251c0158c57d Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 30 Jan 2023 01:24:35 +0100 Subject: [PATCH] Added support for build emulation in Apple and Linux. Signed-off-by: Pol Henarejos --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2305997..fcb5fc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,10 +89,16 @@ target_compile_options(pico_hsm PUBLIC -fdata-sections -ffunction-sections ) - target_link_options(pico_hsm PUBLIC +if(APPLE) +target_link_options(pico_hsm PUBLIC -Wl,-dead_strip ) else() +target_link_options(pico_hsm PUBLIC + -Wl,--gc-sections + ) +endif (APPLE) +else() pico_add_extra_outputs(pico_hsm) target_link_libraries(pico_hsm PRIVATE pico_hsm_sdk pico_stdlib pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id hardware_rtc tinyusb_device tinyusb_board)