Skip to content

Commit 6ce817b

Browse files
authored
build: allow Make.user to tweak bootstrap debug level (#44728)
The `-g1` option for bootstrapping is especially useful to get Julia-level stacktrace in a case when some hard-to-debug error happened inside `Core.Compiler`. Now we can define to enable it locally without modification on Make.inc: > Make.user ``` BOOTSTRAP_DEBUG_LEVEL=1 ```
1 parent 424785a commit 6ce817b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Make.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ JULIA_PRECOMPILE ?= 1
2121
# and LLVM_ASSERTIONS=1.
2222
FORCE_ASSERTIONS ?= 0
2323

24+
# Set BOOTSTRAP_DEBUG_LEVEL to 1 to enable Julia-level stacktrace during bootstrapping.
25+
BOOTSTRAP_DEBUG_LEVEL ?= 0
26+
2427
# OPENBLAS build options
2528
OPENBLAS_TARGET_ARCH:=
2629
OPENBLAS_SYMBOLSUFFIX:=

sysimage.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ RELBUILDROOT := $(call rel_path,$(JULIAHOME)/base,$(BUILDROOT)/base)/ # <-- make
6060
$(build_private_libdir)/corecompiler.ji: $(COMPILER_SRCS)
6161
@$(call PRINT_JULIA, cd $(JULIAHOME)/base && \
6262
$(call spawn,$(JULIA_EXECUTABLE)) -C "$(JULIA_CPU_TARGET)" --output-ji $(call cygpath_w,$@).tmp \
63-
--startup-file=no --warn-overwrite=yes -g0 -O0 compiler/compiler.jl)
63+
--startup-file=no --warn-overwrite=yes -g$(BOOTSTRAP_DEBUG_LEVEL) -O0 compiler/compiler.jl)
6464
@mv $@.tmp $@
6565

6666
$(build_private_libdir)/sys.ji: $(build_private_libdir)/corecompiler.ji $(JULIAHOME)/VERSION $(BASE_SRCS) $(STDLIB_SRCS)

0 commit comments

Comments
 (0)