Generated stubs: the build links into a Linux executable that runs as far as src/ goes
source_tree.py writes generated-src/stubs.cpp: every function, vtable slot and import src/ has not taken over, defined as a stub that prints 'Reached <name> <address>, not reconstructed yet' and stops. CMake builds src/*.cpp + stubs into the isaac executable, so each run names the next function to curate. src/main.cpp hands over to the game's IsaacMain. Classes with only parameterised constructors get a defaulted one, so stub constructors of their holders compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9d4d4f5c64
commit
2b108ca729
5 files changed
+25103
-2
No files matched your search
+3
-1
@@ -37,8 +37,10 @@ target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0)
|
||||
|
||||
# The curated game: src/*.cpp, written on top of the declarations generated-src/classes.h holds for every class.
|
||||
# generated-src/'s own bodies stay out until they compile (scripts/source_tree.py --check reports how many do).
|
||||
# generated-src/stubs.cpp defines everything not curated yet as a stub that stops the game where it is reached, so the
|
||||
# executable always links and runs exactly as far as src/ goes.
|
||||
file(GLOB SOURCES CONFIGURE_DEPENDS src/*.cpp)
|
||||
add_library(isaac STATIC ${SOURCES})
|
||||
add_executable(isaac ${SOURCES} generated-src/stubs.cpp)
|
||||
target_include_directories(isaac PRIVATE src)
|
||||
target_include_directories(isaac SYSTEM PRIVATE generated-src)
|
||||
target_link_libraries(isaac PRIVATE SDL3::SDL3-static lua simdjson)
|
||||
Reference in new issue
Block a user