Skip to content

Commit 6e407ab

Browse files
committed
Add test-JL-stdlibs target for precompiling stdlibs with JuliaLowering
This has a significant blacklist for now, but eventually we should be able to build all of our stdlibs with JuliaLowering (and even include it by default in the sysimage)
1 parent e3573a8 commit 6e407ab

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,29 @@ revise-relocatedepot: revise-% :
7777
embedding:
7878
@$(MAKE) -C $(SRCDIR)/$@ check $(EMBEDDING_ARGS)
7979

80+
.PHONY: julia-sysimg-JL-release julia-sysimg-JL-debug
81+
julia-sysimg-JL-release julia-sysimg-JL-debug : julia-sysimg-JL-% : | $(build_private_libdir)
82+
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-JL-$*
83+
84+
### 34 / 51 (non-sysimage) stdlibs precompile successfully with JuliaLowering ###
85+
JULIALOWERING_FUNCTIONAL_STDLIBS := $(subst $(SPACE),\"$(COMMA)\",$(filter-out \
86+
Statistics StyledStrings SparseArrays Profile JuliaSyntaxHighlighting DelimitedFiles Markdown Dates LibGit2 Downloads InteractiveUtils Test SharedArrays REPL TOML Pkg LazyArtifacts,\
87+
$(shell tail -n +2 < $(JULIAHOME)/stdlib/Project.toml | cut -d= -f1)))
88+
89+
.PHONY: JL-stdlibs
90+
JL-stdlibs: julia-sysimg-JL-$(JULIA_BUILD_MODE)
91+
@TMPDEPOT=$$(mktemp -d); \
92+
trap "rm -rf \"$$TMPDEPOT\"" EXIT; \
93+
if ! JULIA_LOAD_PATH="@stdlib$(PATHSEP)$(shell echo $(call cygpath_w,$(JULIAHOME)/stdlib))" \
94+
JULIA_DEPOT_PATH="$$TMPDEPOT" \
95+
JULIA_FALLBACK_REPL=true \
96+
JULIA_USE_FLISP_LOWERING=0 \
97+
JULIA_CPU_TARGET="sysimage" \
98+
$(call spawn, $(JULIA_EXECUTABLE)) --sysimage $(build_private_libdir)/sys-JL.$(SHLIB_EXT) --startup-file=no -e "Base.Precompilation.precompilepkgs(String[\"$(JULIALOWERING_FUNCTIONAL_STDLIBS)\"]; configs=[\`\`=>Base.CacheFlags(debug_level=2, opt_level=3), \`\`=>Base.CacheFlags(check_bounds=1, debug_level=2, opt_level=3)])"; then \
99+
echo '*** This error is usually fixed by running `make clean`. If the error persists$(COMMA) try `make cleanall`. ***'; \
100+
false; \
101+
fi
102+
80103
.PHONY: gcext
81104
gcext:
82105
@$(MAKE) -C $(SRCDIR)/$@ check $(GCEXT_ARGS)

0 commit comments

Comments
 (0)