cmd/compiler_ir.zi holds the records zir.h declared by hand: modules, functions, statements, expressions, types, laws and proofs, their kinds and the buffer sizes, spelled for C with #c. zir.h includes the generated compiler_ir.h, built like the other compiler modules from a checked seed in bootstrap/compiler_ir. Every field keeps its size and offset, and saved IR, C and Go output are unchanged. C compiled outside the Makefile adds -Ibootstrap/compiler_ir.
14 lines
556 B
Bash
14 lines
556 B
Bash
#!/bin/sh
|
|
set -eu
|
|
ziran=$1
|
|
repo=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
module=compiler_enum_test
|
|
. "$repo/tests/lib/compiler_module.sh"
|
|
|
|
${CC:-cc} ${VM_CFLAGS:-} -std=c11 -D_GNU_SOURCE -I"$repo/include" -I"$(dirname "${ZIRAN_LIB:-$repo/build/libziran.a}")/compiler-enum" \
|
|
-I"$(dirname "${ZIRAN_LIB:-$repo/build/libziran.a}")/compiler-text" \
|
|
-I"$repo/cmd/zir" -I"$repo/bootstrap/compiler_ir" \
|
|
"$repo/tests/compiler_enum_test.c" "${ZIRAN_LIB:-$repo/build/libziran.a}" \
|
|
-pthread -o "$work/source-boundary"
|
|
"$work/source-boundary"
|