Skip to content

Commit

Permalink
Create function and data sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeratec committed Dec 10, 2024
1 parent 2e72c80 commit dd5eda1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ add_library(runtime_host STATIC)
target_compile_options(runtime_host
PRIVATE
-O2
-fdata-sections
-ffunction-sections
)

target_compile_options(runtime_host
Expand Down Expand Up @@ -82,6 +84,8 @@ add_library(runtime_cluster_snitch STATIC)
target_compile_options(runtime_cluster_snitch
PRIVATE
-O2
-ffunction-sections
-fdata-sections
)

target_compile_options(runtime_cluster_snitch
Expand Down
16 changes: 16 additions & 0 deletions tests/chimera-host/host/returnZero/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
# )

23 changes: 23 additions & 0 deletions tests/chimera-open/snitchCluster/simpleOffload/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
# )

0 comments on commit dd5eda1

Please sign in to comment.