modules: 'rebase' from byterun_with_modules, initial impl, without verification

This commit is contained in:
ProgramSnail 2025-01-08 23:52:39 +03:00
parent 73d3fbc388
commit eb1ddfa447
14 changed files with 420 additions and 115 deletions

View file

@ -5,26 +5,13 @@
(:main src/cli.cpp)
(:parser src/parser.cpp)
(:analyzer src/analyzer.cpp)
(:module_manager module_manager.o)
(:obj types.o interpreter.o)
(:runtime ../runtime/runtime.a))
(mode
(promote (until-clean)))
(action
(run g++ -std=c++20 -DWITH_CHECK -Iinclude/ %{main} %{parser} %{analyzer} %{runtime} %{obj} -o %{target})))
(rule
(target old_byterun.exe)
(deps
(:include (source_tree include))
(:main src/cli.cpp)
(:parser src/parser.cpp)
(:analyzer src/analyzer.cpp)
(:obj old_types.o old_interpreter.o)
(:runtime ../runtime/runtime.a))
(mode
(promote (until-clean)))
(action
(run g++ -std=c++20 -Iinclude/ %{main} %{parser} %{analyzer} %{runtime} %{obj} -o %{target})))
(run g++ -std=c++20 -DWITH_CHECK -Iinclude/ %{main} %{parser} %{analyzer} %{module_manager} %{runtime} %{obj} -o %{target})))
(rule
(target types.o)
@ -49,23 +36,12 @@
(run gcc -Iinclude/ -DWITH_CHECK -c %{src} -o %{target})))
(rule
(target old_types.o)
(deps
(:include (source_tree include))
(:src src/types.c)
(:runtime ../runtime/runtime.a))
(mode
(promote (until-clean)))
(action
(run gcc -Iinclude/ -c %{src} -o %{target})))
(rule
(target old_interpreter.o)
(deps
(:include (source_tree include))
(:src src/interpreter.c)
(:runtime ../runtime/runtime.a))
(mode
(promote (until-clean)))
(action
(run gcc -Iinclude/ -c %{src} -o %{target})))
(target module_manager.o)
(deps
(:include (source_tree include))
(:src src/module_manager.cpp)
(:runtime ../runtime/runtime.a))
(mode
(promote (until-clean)))
(action
(run g++ -Iinclude/ -c %{src} -o %{target})))