What changed, and why it matters
This commit changes the build system so that the simulator and its supporting libraries are no longer compiled when running the default `make all` or `make unit-test` targets. It is a build hygiene change to avoid unnecessarily building simulator code during unit-test runs. There is no security-relevant change to firmware behavior, cryptography, or user data handling.
No security action required. Treat as routine build-system cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds EXCLUDE_FROM_ALL to four CMake targets in test/simulator/CMakeLists.txt: sd-mock-simulator, bitbox_objects-simulator, bitbox-simulator, and the simulator executable. This CMake property prevents these targets from being built by the default all target. The stated motivation is that make unit-test builds all and should not build the simulator. No source code, interfaces, or runtime logic are modified.
Changed components
test/simulator/CMakeLists.txtInspect captured patch +4 / −4
diff --git a/test/simulator/CMakeLists.txt b/test/simulator/CMakeLists.txt
index 3268441..45f0881 100644
--- a/test/simulator/CMakeLists.txt
+++ b/test/simulator/CMakeLists.txt
@@ -45,7 +45,7 @@ endforeach()
message("FILTERED SOURCES: ${DBB-FILTERED-SOURCES}")
add_library(sd-mock-simulator
- STATIC
+ STATIC EXCLUDE_FROM_ALL
framework/mock_diskio.c
)
target_include_directories(
@@ -60,7 +60,7 @@ target_include_directories(
# library.
# See https://cmake.org/cmake/help/v3.10/command/add_library.html#object-libraries
add_library(bitbox_objects-simulator
- OBJECT
+ OBJECT EXCLUDE_FROM_ALL
${DBB-FILTERED-SOURCES}
${ETHEREUM-SOURCES}
framework/mock_cipher.c
@@ -72,7 +72,7 @@ add_library(bitbox_objects-simulator
)
add_library(bitbox-simulator
- STATIC
+ STATIC EXCLUDE_FROM_ALL
$<TARGET_OBJECTS:bitbox_objects-simulator>
)
@@ -175,7 +175,7 @@ endif()
#-----------------------------------------------------------------------------
# Simulator
-add_executable(simulator simulator.c framework/eh_personality.c)
+add_executable(simulator EXCLUDE_FROM_ALL simulator.c framework/eh_personality.c)
# asan must be first library in linking order
target_link_libraries(simulator PRIVATE
$<$<BOOL:${SANITIZE_ADDRESS}>:asan>
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.