fix(selfhost): stdlib path + merge all modules, not just imports
- Fix Cli_FindStdlibDir: search for lib/ instead of stdlib/ - Fix Cli_CollectStdlibImports → merge ALL lib/*.bux via bux_list_dir - Fix Cli_CollectStdlibImports path: remove Std/ subdir (now flat) - Add ../../ fallback for rt/ paths (build/selfhost depth) - Update PLAN.md with v0.3.0 structure + v1.0.0 roadmap - Remaining: 7 sema cross-module resolution bugs (pre-existing)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
NIM := nim
|
||||
SRC := compiler/bootstrap/main.nim
|
||||
SRC := bootstrap/main.nim
|
||||
OUT := buxc
|
||||
BUILD_DIR := build
|
||||
|
||||
@@ -21,15 +21,15 @@ debug: dev
|
||||
|
||||
test: build test-examples
|
||||
@echo "Running lexer tests..."
|
||||
$(NIM) c -r compiler/tests/lexer_test.nim
|
||||
$(NIM) c -r tests/lexer_test.nim
|
||||
@echo "Running parser tests..."
|
||||
$(NIM) c -r compiler/tests/parser_test.nim
|
||||
$(NIM) c -r tests/parser_test.nim
|
||||
@echo "Running sema tests..."
|
||||
$(NIM) c -r compiler/tests/sema_test.nim
|
||||
$(NIM) c -r tests/sema_test.nim
|
||||
@echo "Running HIR tests..."
|
||||
$(NIM) c -r compiler/tests/hir_test.nim
|
||||
$(NIM) c -r tests/hir_test.nim
|
||||
@echo "Running borrow checker tests..."
|
||||
$(NIM) c -r compiler/tests/borrow_test.nim
|
||||
$(NIM) c -r tests/borrow_test.nim
|
||||
@echo "Running integration tests..."
|
||||
rm -rf _test_tmp_pkg
|
||||
./$(OUT) new _test_tmp_pkg
|
||||
@@ -62,14 +62,15 @@ clean:
|
||||
rm -rf _test_cast _test_cast2 _test_cast3 _test_channel
|
||||
|
||||
clean-all: clean
|
||||
rm -rf _selfhost/src _selfhost/build
|
||||
rm -rf build/selfhost
|
||||
|
||||
selfhost: build
|
||||
@echo "=== Building self-hosted compiler ==="
|
||||
@rm -rf _selfhost/src _selfhost/build
|
||||
@mkdir -p _selfhost/src
|
||||
@cp compiler/selfhost/*.bux _selfhost/src/
|
||||
@mv _selfhost/src/main.bux _selfhost/src/Main.bux 2>/dev/null || true
|
||||
@cd _selfhost && ../$(OUT) build
|
||||
@strip _selfhost/build/buxc2
|
||||
@rm -rf build/selfhost
|
||||
@mkdir -p build/selfhost/src
|
||||
@cp src/*.bux build/selfhost/src/
|
||||
@cp src/bux.toml build/selfhost/
|
||||
@mv build/selfhost/src/main.bux build/selfhost/src/Main.bux 2>/dev/null || true
|
||||
@cd build/selfhost && ../../$(OUT) build
|
||||
@strip build/selfhost/build/buxc2 2>/dev/null || true
|
||||
@echo "=== Self-hosted compiler built successfully ==="
|
||||
|
||||
Reference in New Issue
Block a user