diff --git a/nix/buildLeanPackage.nix b/nix/buildLeanPackage.nix index 6770c53bb6..5e197cea55 100644 --- a/nix/buildLeanPackage.nix +++ b/nix/buildLeanPackage.nix @@ -136,6 +136,7 @@ with builtins; let buildMod = mod: deps: mkBareDerivation rec { name = "${mod}"; LEAN_PATH = depRoot mod deps; + LEAN_ABORT_ON_PANIC = "1"; relpath = modToPath mod; buildInputs = [ lean ]; leanPath = relpath + ".lean"; diff --git a/src/stdlib.make.in b/src/stdlib.make.in index 1df5d45653..53a75888fd 100644 --- a/src/stdlib.make.in +++ b/src/stdlib.make.in @@ -3,6 +3,7 @@ SHELL := /usr/bin/env bash -euo pipefail # any absolute path to the stdlib breaks the Makefile export LEAN_PATH= export LEAN_CC=${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER} +export LEAN_ABORT_ON_PANIC=1 # LEAN_OPTS: don't use native code (except for primitives) since it is from the previous stage # MORE_DEPS: rebuild the stdlib whenever the compiler has changed