build(runtime): enable pipefail so compiler errors fail the build
The Pascal RTL recipes pipe $(BLAISE) --emit-ir through sed to strip the program section before writing the .ssa file. Without pipefail, sed's exit code masks a failing compiler invocation: the recipe succeeds with an empty .ssa, QBE emits an empty .s, gcc archives an empty .o, and the first symptom is a downstream link failure with "no symbols". Set SHELL=/bin/bash and .SHELLFLAGS=-o pipefail -c at the top of the Makefile so every recipe inherits pipefail. Verified by injecting a parse error into a build driver: make now exits with Error 1 and prints the compiler's diagnostic, instead of silently producing an empty archive member.
This commit is contained in:
parent
b7b3d9000f
commit
7dbb981665
|
|
@ -5,6 +5,13 @@
|
|||
# Licensed under the Apache License v2.0 with Runtime Library Exception.
|
||||
# See LICENSE file in the project root for full license terms.
|
||||
#
|
||||
# Use bash with pipefail so that compiler errors in a `... | sed ...`
|
||||
# pipeline propagate, instead of being masked by sed's exit code.
|
||||
# Without this, a failing $(BLAISE) invocation produces an empty .ssa
|
||||
# file and the build silently archives an empty .o (see bugs.txt BUG-004).
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS = -o pipefail -c
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -Wall -Wextra -std=c11
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue