2023-03-30 07:58:50 -05:00
|
|
|
include ../tools.mk
|
2021-05-26 19:44:03 -05:00
|
|
|
|
|
|
|
SESSION_DIR := $(TMPDIR)/session
|
|
|
|
OUTPUT_FILE := $(TMPDIR)/build-output
|
|
|
|
|
|
|
|
all:
|
|
|
|
echo $(TMPDIR)
|
|
|
|
# Make it so that rustc will fail to create a session directory.
|
2021-05-29 10:54:51 -05:00
|
|
|
touch $(SESSION_DIR)
|
2021-05-26 19:44:03 -05:00
|
|
|
# Check exit code is 1 for an error, and not 101 for ICE.
|
|
|
|
$(RUSTC) foo.rs --crate-type=rlib -C incremental=$(SESSION_DIR) > $(OUTPUT_FILE) 2>&1; [ $$? -eq 1 ]
|
2022-09-26 09:42:12 -05:00
|
|
|
$(CGREP) "could not create incremental compilation crate directory" < $(OUTPUT_FILE)
|
2021-05-26 19:44:03 -05:00
|
|
|
# -v tests are fragile, hopefully this text won't change
|
|
|
|
$(CGREP) -v "internal compiler error" < $(OUTPUT_FILE)
|