实现 12.3 toml 读取:schema 校验、文件集合、工程哈希。
- Project.h/cpp:toml++ 解析 + 字段白名单(未知键带行号报错)、name/entry/cycle_limit/dt_ms/files.st 必填、io 条目完整性、entry 必须 program MAIN - compile_files:files.st ∪ gvl.file 去重;compute_project_hash:路径排序后 FNV-1a 64 增量,缺文件报 file missing - STCompiler <project.toml>:打印文件列表与哈希,失败退出码 1,--help - compiler 私有链接 toml++ v3.4.0;测试固化 compiler_toml(35 断言,line1 哈希冻结 0xc3fe4ae74ad45900)
This commit is contained in:
@@ -12,3 +12,14 @@ target_link_libraries(isa_test PRIVATE isa)
|
||||
|
||||
add_test(NAME isa_roundtrip
|
||||
COMMAND isa_test)
|
||||
|
||||
# compiler 库测试:toml schema、文件集合、工程哈希(REPO_ROOT 注入源目录绝对路径)
|
||||
add_executable(compiler_test
|
||||
./src/compiler_test.cpp)
|
||||
|
||||
target_link_libraries(compiler_test PRIVATE compiler)
|
||||
target_compile_definitions(compiler_test PRIVATE
|
||||
REPO_ROOT="${CMAKE_SOURCE_DIR}")
|
||||
|
||||
add_test(NAME compiler_toml
|
||||
COMMAND compiler_test)
|
||||
|
||||
Reference in New Issue
Block a user