Skip to content

Commit

Permalink
Mavis is now a library; reduces build time and .o sizes (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
Knute Lingaard committed Oct 13, 2023
1 parent 0c98a64 commit c23b533
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ include_directories (core mss sim)
include_directories (SYSTEM mavis)
include_directories (SYSTEM stf_lib)

# The Core, MSS, and the simulator
add_subdirectory(core)
add_subdirectory(mss)
# Mavis, the Core, MSS, and the simulator
add_subdirectory (mavis)
add_subdirectory (core)
add_subdirectory (mss)

# Add STF library to the build
add_subdirectory (${STF_LIB_BASE})
Expand All @@ -80,7 +81,7 @@ add_executable(olympia
sim/OlympiaSim.cpp
sim/main.cpp
)
target_link_libraries (olympia core mss SPARTA::sparta ${STF_LINK_LIBS})
target_link_libraries (olympia core mss SPARTA::sparta mavis ${STF_LINK_LIBS})
if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease")
target_compile_options (core PUBLIC -flto)
target_compile_options (mss PUBLIC -flto)
Expand Down
2 changes: 1 addition & 1 deletion test/core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ project(common_test)
add_library(common_test
SourceUnit.cpp
)
target_link_libraries(common_test PRIVATE core SPARTA::sparta)
target_link_libraries(common_test PRIVATE core mavis SPARTA::sparta)
2 changes: 1 addition & 1 deletion test/core/dispatch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(Dispatch_test)

add_executable(Dispatch_test Dispatch_test.cpp)
target_link_libraries(Dispatch_test core common_test ${STF_LINK_LIBS} SPARTA::sparta)
target_link_libraries(Dispatch_test core common_test ${STF_LINK_LIBS} mavis SPARTA::sparta)

file(CREATE_LINK ${SIM_BASE}/mavis/json ${CMAKE_CURRENT_BINARY_DIR}/mavis_isa_files SYMBOLIC)
file(CREATE_LINK ${SIM_BASE}/arches ${CMAKE_CURRENT_BINARY_DIR}/arches SYMBOLIC)
Expand Down
4 changes: 2 additions & 2 deletions test/core/rename/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target_link_libraries (core mss)

add_executable(Rename_test Rename_test.cpp ${SIM_BASE}/sim/OlympiaSim.cpp)

target_link_libraries(Rename_test core common_test ${STF_LINK_LIBS} SPARTA::sparta)
target_link_libraries(Rename_test core common_test ${STF_LINK_LIBS} mavis SPARTA::sparta)

file(CREATE_LINK ${SIM_BASE}/mavis/json ${CMAKE_CURRENT_BINARY_DIR}/mavis_isa_files SYMBOLIC)
file(CREATE_LINK ${SIM_BASE}/arches ${CMAKE_CURRENT_BINARY_DIR}/arches SYMBOLIC)
Expand All @@ -24,4 +24,4 @@ sparta_named_test(Rename_test_Run_Big_Small_Rename Rename_test big_core_small
sparta_named_test(Rename_test_Run_Small_lsu_int_dependency Rename_test small_core.out -c test_cores/test_small_core_full.yaml --input-file raw_int_lsu.json)
sparta_named_test(Rename_test_Run_Small_lsu_float_dependency Rename_test small_core.out -c test_cores/test_small_core_full.yaml --input-file raw_float_lsu.json)
sparta_named_test(Rename_test_Run_Small_int_dependency Rename_test small_core.out -c test_cores/test_medium_core_full.yaml --input-file raw_integer.json)
sparta_named_test(Rename_test_i2f Rename_test small_core.out -c test_cores/test_medium_core_full.yaml --input-file i2f.json)
sparta_named_test(Rename_test_i2f Rename_test small_core.out -c test_cores/test_medium_core_full.yaml --input-file i2f.json)

0 comments on commit c23b533

Please sign in to comment.