From 9735a5f70daad8fa12b4a3a42d8388095f9b2ce4 Mon Sep 17 00:00:00 2001 From: Philip Wiese Date: Tue, 10 Dec 2024 17:26:22 +0100 Subject: [PATCH] Create function and data sections --- targets/chimera-convolve/CMakeLists.txt | 4 ++++ targets/chimera-host/CMakeLists.txt | 2 ++ targets/chimera-open/CMakeLists.txt | 4 ++++ .../host/returnZero/CMakeLists.txt | 16 +++++++++++++ .../simpleOffload/CMakeLists.txt | 23 +++++++++++++++++++ 5 files changed, 49 insertions(+) diff --git a/targets/chimera-convolve/CMakeLists.txt b/targets/chimera-convolve/CMakeLists.txt index 57d4cad..564b8de 100644 --- a/targets/chimera-convolve/CMakeLists.txt +++ b/targets/chimera-convolve/CMakeLists.txt @@ -36,6 +36,8 @@ target_include_directories(runtime_host target_compile_options(runtime_host PRIVATE -O2 + -ffunction-sections + -fdata-sections ) target_compile_options(runtime_host @@ -70,6 +72,8 @@ target_include_directories(runtime_cluster_snitch target_compile_options(runtime_cluster_snitch PRIVATE -O2 + -ffunction-sections + -fdata-sections ) target_compile_options(runtime_cluster_snitch diff --git a/targets/chimera-host/CMakeLists.txt b/targets/chimera-host/CMakeLists.txt index 1a7cb65..7be6d71 100644 --- a/targets/chimera-host/CMakeLists.txt +++ b/targets/chimera-host/CMakeLists.txt @@ -36,6 +36,8 @@ target_include_directories(runtime_host target_compile_options(runtime_host PRIVATE -O2 + -ffunction-sections + -fdata-sections ) target_compile_options(runtime_host diff --git a/targets/chimera-open/CMakeLists.txt b/targets/chimera-open/CMakeLists.txt index 57d4cad..564b8de 100644 --- a/targets/chimera-open/CMakeLists.txt +++ b/targets/chimera-open/CMakeLists.txt @@ -36,6 +36,8 @@ target_include_directories(runtime_host target_compile_options(runtime_host PRIVATE -O2 + -ffunction-sections + -fdata-sections ) target_compile_options(runtime_host @@ -70,6 +72,8 @@ target_include_directories(runtime_cluster_snitch target_compile_options(runtime_cluster_snitch PRIVATE -O2 + -ffunction-sections + -fdata-sections ) target_compile_options(runtime_cluster_snitch diff --git a/tests/chimera-host/host/returnZero/CMakeLists.txt b/tests/chimera-host/host/returnZero/CMakeLists.txt index e3f58aa..9bced50 100644 --- a/tests/chimera-host/host/returnZero/CMakeLists.txt +++ b/tests/chimera-host/host/returnZero/CMakeLists.txt @@ -30,4 +30,20 @@ add_chimera_test( # WIESEP: Link the host to the test executable target_link_libraries(${TEST_NAME} PUBLIC ${TEST_NAME}_host) +################################################################################ +# Debugging Options # +################################################################################ + +target_compile_options(${TEST_NAME}_host + PUBLIC + -ffunction-sections + -fdata-sections +) + +# target_link_options(${TEST_NAME} +# PUBLIC +# -Wl,--print-memory-usage +# -Wl,--print-gc-sections +# -Wl,--gc-sections +# ) diff --git a/tests/chimera-open/snitchCluster/simpleOffload/CMakeLists.txt b/tests/chimera-open/snitchCluster/simpleOffload/CMakeLists.txt index 2c1f0bc..f3e565f 100644 --- a/tests/chimera-open/snitchCluster/simpleOffload/CMakeLists.txt +++ b/tests/chimera-open/snitchCluster/simpleOffload/CMakeLists.txt @@ -46,3 +46,26 @@ add_chimera_test( target_link_libraries(${TEST_NAME} PUBLIC ${TEST_NAME}_host) target_link_libraries(${TEST_NAME} PUBLIC ${TEST_NAME}_cluster) +################################################################################ +# Debugging Options # +################################################################################ + +target_compile_options(${TEST_NAME}_host + PUBLIC + -ffunction-sections + -fdata-sections +) + +target_compile_options(${TEST_NAME}_cluster + PUBLIC + -ffunction-sections + -fdata-sections +) + +# target_link_options(${TEST_NAME} +# PUBLIC +# -Wl,--print-memory-usage +# -Wl,--print-gc-sections +# -Wl,--gc-sections +# ) +