双可执行落地:STCompiler 与 BytecodeExecutor。
- STCompiler 入口在 compiler/src/main.cpp,链 compiler+isa - host/ 改名 executor/,BytecodeExecutor 链 vm+isa 不链 compiler - compiler/vm 补 PUBLIC 链 isa;顶层加入 executor - CTest:版本冒烟 2 例 + isa_roundtrip(89 断言),3/3 通过
This commit is contained in:
@@ -6,8 +6,15 @@ project(Compiler
|
||||
VERSION 0.1
|
||||
DESCRIPTION "ST / toml 编译器")
|
||||
|
||||
include_directories(./include)
|
||||
|
||||
# 词法、语法、符号表、类型检查、codegen、链接都留在 compiler 一个库里
|
||||
add_library(compiler STATIC
|
||||
./src/Lexer.cpp)
|
||||
|
||||
target_include_directories(compiler PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_link_libraries(compiler PUBLIC isa)
|
||||
|
||||
# 可执行入口:STCompiler <project.toml> -o <name>.stb
|
||||
add_executable(STCompiler
|
||||
./src/main.cpp)
|
||||
|
||||
target_link_libraries(STCompiler PRIVATE compiler)
|
||||
|
||||
Reference in New Issue
Block a user