diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-07-24 17:12:21 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-07-24 17:12:21 +0800 |
| commit | 676da10a45af912d9226dce4cb447bf7bd923da0 (patch) | |
| tree | 1d973ebb1dd157c6db9f99c50259d5248a2d8240 /makefile | |
| parent | c9f3a486cfdad6e134ec88b1e43717508e066796 (diff) | |
| download | yuescript-676da10a45af912d9226dce4cb447bf7bd923da0.tar.gz yuescript-676da10a45af912d9226dce4cb447bf7bd923da0.tar.bz2 yuescript-676da10a45af912d9226dce4cb447bf7bd923da0.zip | |
Optimize compiler parsing and module state
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 19 |
1 files changed, 17 insertions, 2 deletions
| @@ -437,9 +437,25 @@ clean: | |||
| 437 | @$(RM) -r bin | 437 | @$(RM) -r bin |
| 438 | @$(RM) -r $(TEST_OUTPUT) | 438 | @$(RM) -r $(TEST_OUTPUT) |
| 439 | 439 | ||
| 440 | # Test shared Lua module state lifecycle | ||
| 441 | .PHONY: test-same-module | ||
| 442 | test-same-module: debug | ||
| 443 | @$(CXX) -std=c++20 -DYUE_UTF8_IMPL $(INCLUDES) \ | ||
| 444 | spec/cpp/same_module_state_test.cpp \ | ||
| 445 | build/debug/yuescript/ast.o \ | ||
| 446 | build/debug/yuescript/parser.o \ | ||
| 447 | build/debug/yuescript/yue_ast.o \ | ||
| 448 | build/debug/yuescript/yue_compiler.o \ | ||
| 449 | build/debug/yuescript/yue_parser.o \ | ||
| 450 | build/debug/yuescript/yuescript.o \ | ||
| 451 | $(SRC_PATH)/3rdParty/lua/liblua.a \ | ||
| 452 | $(LINK_FLAGS) \ | ||
| 453 | -o build/debug/same_module_state_test | ||
| 454 | @build/debug/same_module_state_test | ||
| 455 | |||
| 440 | # Test Yuescript compiler | 456 | # Test Yuescript compiler |
| 441 | .PHONY: test | 457 | .PHONY: test |
| 442 | test: debug | 458 | test: test-same-module |
| 443 | @mkdir -p $(TEST_OUTPUT)/5.1/test | 459 | @mkdir -p $(TEST_OUTPUT)/5.1/test |
| 444 | @echo "Compiling Yuescript codes..." | 460 | @echo "Compiling Yuescript codes..." |
| 445 | @$(START_TIME) | 461 | @$(START_TIME) |
| @@ -516,4 +532,3 @@ $(BUILD_PATH)/%.o: $(SRC_PATH)/%.c | |||
| 516 | $(CMD_PREFIX)$(CC) $(CFLAGS) $(INCLUDES) -MP -MMD -c $< -o $@ | 532 | $(CMD_PREFIX)$(CC) $(CFLAGS) $(INCLUDES) -MP -MMD -c $< -o $@ |
| 517 | @echo -en "\t Compile time: " | 533 | @echo -en "\t Compile time: " |
| 518 | @$(END_TIME) | 534 | @$(END_TIME) |
| 519 | |||
