-
Notifications
You must be signed in to change notification settings - Fork 0
Build and Test
james-yusuke edited this page Jul 16, 2026
·
1 revision
- Bazel
- LLVM 22
-
llvm-config、llvm-as、llvm-dis、llc clang
eval "$(scripts/setup-llvm.sh 22 --print-env)"helperはsystem directoryへsymlinkを作らず、現在のshell用にLLVM pathを設定します。
bazel build \
//:ycc-bootstrap \
//:ycc-stage1 \
//:ycc-stage2 \
//:ycc-stage3 \
//:ycc \
//:ycc-ycplbazel test //:self_host_stage_test //:ycc_ycpl_test
bazel test //...fixed-point testはstage2/stage3 IR完全一致、hello build/run、77件のconformance、 bootstrap/fallback経路不在を検査します。
bazel build //:ycc-bootstrap成果物はbazel-bin/ycc-bootstrapです。bootstrapからstage1相当のYCPL compilerを
手動生成する場合は、project directoryへ移動して実行します。
mkdir -p /tmp/ycpl-stage1
(
cd compiler/ycpl
../../bazel-bin/ycc-bootstrap build -o /tmp/ycpl-stage1
)/tmp/ycpl-stage1/yccが生成されます。
YCPL_STL_ROOT="$PWD/stl" \
YCPL_RUNTIME_SRC="$PWD/bootstrap/cpp/runtime/yc_runtime.c" \
/tmp/ycpl-stage1/ycc \
build examples/basics/hello.yc -o /tmp/ycpl-hello
/tmp/ycpl-hello/merged期待出力:
Hello World
通常の利用:
bazel run //:ycc -- run examples/basics/hello.yctests/run_conformance.sh ./bazel-bin/ycc現在のsuiteは77件で、positive、negative、runtime ownership、project/module、
stdlib、c/* FFI、Vec、dynamic limitsを検査します。