From c23b533791f77b61bd7d789948dc98a82ec624a7 Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Fri, 13 Oct 2023 08:56:14 -0500 Subject: [PATCH] Mavis is now a library; reduces build time and .o sizes (#95) --- CMakeLists.txt | 9 +++++---- mavis | 2 +- test/core/common/CMakeLists.txt | 2 +- test/core/dispatch/CMakeLists.txt | 2 +- test/core/rename/CMakeLists.txt | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f7edd1a..c9c484da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) @@ -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) diff --git a/mavis b/mavis index c3c1060c..ba3d7e41 160000 --- a/mavis +++ b/mavis @@ -1 +1 @@ -Subproject commit c3c1060cf59baf8c16c13ddd2473f84e7c3aeb65 +Subproject commit ba3d7e4141cd1dbce03cf7eb5481179836f2ac0f diff --git a/test/core/common/CMakeLists.txt b/test/core/common/CMakeLists.txt index ed87dfd4..44e6957d 100644 --- a/test/core/common/CMakeLists.txt +++ b/test/core/common/CMakeLists.txt @@ -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) diff --git a/test/core/dispatch/CMakeLists.txt b/test/core/dispatch/CMakeLists.txt index f2183449..45e69945 100644 --- a/test/core/dispatch/CMakeLists.txt +++ b/test/core/dispatch/CMakeLists.txt @@ -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) diff --git a/test/core/rename/CMakeLists.txt b/test/core/rename/CMakeLists.txt index e6aebea9..f36177a3 100644 --- a/test/core/rename/CMakeLists.txt +++ b/test/core/rename/CMakeLists.txt @@ -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) @@ -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) \ No newline at end of file +sparta_named_test(Rename_test_i2f Rename_test small_core.out -c test_cores/test_medium_core_full.yaml --input-file i2f.json)