Extended prettyasserts.py to support unreachable statements

The main benefit is control over error reporting and avoiding the dive
into stdlib layers when debugging thanks to __builtin_trap().

This changes -p/--pattern -> -a/--assert

And adds -u/--unreachable
This commit is contained in:
Christopher Haster
2024-02-14 01:59:03 -06:00
parent 1422a61d16
commit 738dd86339
2 changed files with 54 additions and 16 deletions
+2 -2
View File
@@ -522,10 +522,10 @@ $(BUILDDIR)/%.s: %.c
$(CC) -S $(CFLAGS) $< -o $@
$(BUILDDIR)/%.c: %.a.c
./scripts/prettyasserts.py -p LFS_ASSERT $< -o $@
./scripts/prettyasserts.py -a LFS_ASSERT -u LFS_UNREACHABLE $< -o $@
$(BUILDDIR)/%.c: $(BUILDDIR)/%.a.c
./scripts/prettyasserts.py -p LFS_ASSERT $< -o $@
./scripts/prettyasserts.py -a LFS_ASSERT -u LFS_UNREACHABLE $< -o $@
$(BUILDDIR)/%.t.a.c: %.toml
./scripts/test.py -c $< $(TESTCFLAGS) -o $@