Skip to content

Commit

Permalink
Revert "build: cleanup base files inclusion (#45441)"
Browse files Browse the repository at this point in the history
This reverts commit f0b1c5f.
  • Loading branch information
JeffBezanson committed Aug 3, 2022
1 parent df84643 commit 0386f83
Show file tree
Hide file tree
Showing 16 changed files with 116 additions and 136 deletions.
28 changes: 12 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default: $(JULIA_BUILD_MODE) # contains either "debug" or "release"
all: debug release

# sort is used to remove potential duplicates
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/src $(build_datarootdir)/julia/stdlib $(build_man1dir))
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/stdlib $(build_man1dir))
ifneq ($(BUILDROOT),$(JULIAHOME))
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src src/flisp src/support src/clangsa cli doc deps stdlib test test/clangsa test/embedding test/llvmpasses)
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS)) $(BUILDROOT)/sysimage.mk
Expand Down Expand Up @@ -39,13 +39,13 @@ configure:
endif

$(foreach dir,$(DIRS),$(eval $(call dir_target,$(dir))))
$(eval $(call symlink_target,$(JULIAHOME)/test,$$(build_datarootdir)/julia,test))
$(foreach link,base $(JULIAHOME)/test,$(eval $(call symlink_target,$(link),$$(build_datarootdir)/julia,$(notdir $(link)))))

julia_flisp.boot.inc.phony: julia-deps
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src julia_flisp.boot.inc.phony

# Build the HTML docs (skipped if already exists, notably in tarballs)
$(BUILDROOT)/doc/_build/html/en/index.html: $(shell find $(BUILDROOT)/base $(BUILDROOT)/doc \( -path $(BUILDROOT)/doc/_build -o -path $(BUILDROOT)/doc/deps \) -prune -o -type f -print)
$(BUILDROOT)/doc/_build/html/en/index.html: $(shell find $(BUILDROOT)/base $(BUILDROOT)/doc \( -path $(BUILDROOT)/doc/_build -o -path $(BUILDROOT)/doc/deps -o -name *_constants.jl -o -name *_h.jl -o -name version_git.jl \) -prune -o -type f -print)
@$(MAKE) docs

julia-symlink: julia-cli-$(JULIA_BUILD_MODE)
Expand All @@ -58,7 +58,7 @@ ifndef JULIA_VAGRANT_BUILD
endif
endif

julia-deps: | $(DIRS) $(build_datarootdir)/julia/test
julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/deps

# `julia-stdlib` depends on `julia-deps` so that the fake JLL stdlibs can copy in their Artifacts.toml files.
Expand Down Expand Up @@ -86,14 +86,9 @@ julia-sysimg-ji : julia-stdlib julia-base julia-cli-$(JULIA_BUILD_MODE) julia-sr
julia-sysimg-bc : julia-stdlib julia-base julia-cli-$(JULIA_BUILD_MODE) julia-src-$(JULIA_BUILD_MODE) | $(build_private_libdir)
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-bc JULIA_EXECUTABLE='$(JULIA_EXECUTABLE)'

$(JULIA_SYSIMG_release): julia-sysimg-ji julia-src-release
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-release
$(JULIA_SYSIMG_debug) : julia-sysimg-ji julia-src-debug
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-debug
julia-sysimg-release julia-sysimg-debug : julia-sysimg-% : julia-sysimg-ji julia-src-%
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-$*

julia-sysimg-release : $(JULIA_SYSIMG_release)
julia-sysimg-debug : $(JULIA_SYSIMG_debug)
julia-base-cache: $(build_datarootdir)/julia/base.cache
julia-debug julia-release : julia-% : julia-sysimg-% julia-src-% julia-symlink julia-libccalltest julia-libllvmcalltest julia-base-cache

debug release : % : julia-%
Expand Down Expand Up @@ -163,10 +158,10 @@ $(build_datarootdir)/julia/julia-config.jl: $(JULIAHOME)/contrib/julia-config.jl
$(build_depsbindir)/stringreplace: $(JULIAHOME)/contrib/stringreplace.c | $(build_depsbindir)
@$(call PRINT_CC, $(HOSTCC) -o $(build_depsbindir)/stringreplace $(JULIAHOME)/contrib/stringreplace.c)

$(build_datarootdir)/julia/base.cache: $(JULIA_SYSIMG) | $(DIRS) $(build_datarootdir)/julia
julia-base-cache: julia-sysimg-$(JULIA_BUILD_MODE) | $(DIRS) $(build_datarootdir)/julia
@JULIA_BINDIR=$(call cygpath_w,$(build_bindir)) WINEPATH="$(call cygpath_w,$(build_bindir));$$WINEPATH" \
$(call spawn, $(JULIA_EXECUTABLE) --startup-file=no $(call cygpath_w,$(JULIAHOME)/etc/write_base_cache.jl) \
$(call cygpath_w,$@))
$(call cygpath_w,$(build_datarootdir)/julia/base.cache))

# public libraries, that are installed in $(prefix)/lib
JL_TARGETS := julia
Expand Down Expand Up @@ -320,9 +315,10 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1)
endif

# Copy in all .jl sources as well
mkdir -p $(DESTDIR)$(datarootdir)/julia/src $(DESTDIR)$(datarootdir)/julia/test
cp -R -L $(build_datarootdir)/julia/* $(DESTDIR)$(datarootdir)/julia
mkdir -p $(DESTDIR)$(datarootdir)/julia/base $(DESTDIR)$(datarootdir)/julia/test
cp -R -L $(JULIAHOME)/base/* $(DESTDIR)$(datarootdir)/julia/base
cp -R -L $(JULIAHOME)/test/* $(DESTDIR)$(datarootdir)/julia/test
cp -R -L $(build_datarootdir)/julia/* $(DESTDIR)$(datarootdir)/julia
# Copy documentation
cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/
# Remove various files which should not be installed
Expand Down Expand Up @@ -468,7 +464,7 @@ ifneq ($(BUILDROOT),$(JULIAHOME))
$(error make light-source-dist does not work in out-of-tree builds)
endif
# Save git information
-@$(MAKE) -C $(JULIAHOME)/base version_git.jl
-@$(MAKE) -C $(JULIAHOME)/base version_git.jl.phony

# Create file light-source-dist.tmp to hold all the filenames that go into the tarball
echo "base/version_git.jl" > light-source-dist.tmp
Expand Down
6 changes: 6 additions & 0 deletions base/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/features_h.jl
/pcre_h.jl
/errno_h.jl
/build_h.jl
/build_h.jl.phony
/file_constants.jl
/uv_constants.jl
/version_git.jl
/version_git.jl.phony
/userimg.jl
14 changes: 12 additions & 2 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,18 @@ using .Iterators: Flatten, Filter, product # for generators
include("namedtuple.jl")

# For OS specific stuff
include("../build_h.jl")
include("../version_git.jl")
# We need to strcat things here, before strings are really defined
function strcat(x::String, y::String)
out = ccall(:jl_alloc_string, Ref{String}, (Csize_t,), Core.sizeof(x) + Core.sizeof(y))
GC.@preserve x y out begin
out_ptr = unsafe_convert(Ptr{UInt8}, out)
unsafe_copyto!(out_ptr, unsafe_convert(Ptr{UInt8}, x), Core.sizeof(x))
unsafe_copyto!(out_ptr + Core.sizeof(x), unsafe_convert(Ptr{UInt8}, y), Core.sizeof(y))
end
return out
end
include(strcat((length(Core.ARGS)>=2 ? Core.ARGS[2] : ""), "build_h.jl")) # include($BUILDROOT/base/build_h.jl)
include(strcat((length(Core.ARGS)>=2 ? Core.ARGS[2] : ""), "version_git.jl")) # include($BUILDROOT/base/version_git.jl)

# These used to be in build_h.jl and are retained for backwards compatibility
const libblas_name = "libblastrampoline"
Expand Down
88 changes: 26 additions & 62 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,7 @@ include $(JULIAHOME)/Make.inc

TAGGED_RELEASE_BANNER := ""

all:

BASE_SRCS := $(patsubst ./%,%,$(shell cd $(SRCDIR) && find . -name \*.jl -and -not -name version_git.jl -and -not -name '*.phony'))
GENERATED_SRCS := pcre_h.jl errno_h.jl build_h.jl.phony features_h.jl file_constants.jl uv_constants.jl version_git.jl.phony

GENERATED_DSTS := $(addprefix $(build_datarootdir)/julia/src/,$(GENERATED_SRCS))
BASE_DSTS := $(addprefix $(build_datarootdir)/julia/src/base/,$(BASE_SRCS)) $(GENERATED_DSTS)
BASE_DIRS := $(sort $(dir $(BASE_DSTS)))
$(foreach dir,$(BASE_DIRS),$(eval $(call dir_target,$(dir))))

# we might like to add "| $(BASE_DIRS)" here, but that causes many version of 'make' to get confused and fail to build consistently
$(build_datarootdir)/julia/src/base/%.jl: $(SRCDIR)/%.jl
@mkdir -p $(dir $@)
cp $< $@

all: $(BASE_DSTS)
all: $(addprefix $(BUILDDIR)/,pcre_h.jl errno_h.jl build_h.jl.phony features_h.jl file_constants.jl uv_constants.jl version_git.jl.phony)

PCRE_CONST := 0x[0-9a-fA-F]+|[0-9]+|\([\-0-9]+\)
ifeq ($(USE_SYSTEM_PCRE), 1)
Expand All @@ -31,37 +16,29 @@ endif

define parse_features
@echo "# $(2) features" >> $@
@$(call PRINT_PERL, cat $(JULIAHOME)/src/features_$(1).h | \
perl -lne 'print "const JL_$(2)_$$1 = UInt32($$2)" if /^\s*JL_FEATURE_DEF(?:_NAME)?\(\s*(\w+)\s*,\s*([^,]+)\s*,.*\)\s*(?:\/\/.*)?$$/' >> $@)
@$(call PRINT_PERL, cat $(SRCDIR)/../src/features_$(1).h | perl -lne 'print "const JL_$(2)_$$1 = UInt32($$2)" if /^\s*JL_FEATURE_DEF(?:_NAME)?\(\s*(\w+)\s*,\s*([^,]+)\s*,.*\)\s*(?:\/\/.*)?$$/' >> $@)
@echo >> $@
endef

$(build_datarootdir)/julia/src/features_h.jl: $(JULIAHOME)/src/features_x86.h $(JULIAHOME)/src/features_aarch32.h $(JULIAHOME)/src/features_aarch64.h
@mkdir -p $(dir $@)
$(BUILDDIR)/features_h.jl: $(SRCDIR)/../src/features_x86.h $(SRCDIR)/../src/features_aarch32.h $(SRCDIR)/../src/features_aarch64.h
@-rm -f $@
@$(call parse_features,x86,X86)
@$(call parse_features,aarch32,AArch32)
@$(call parse_features,aarch64,AArch64)

$(build_datarootdir)/julia/src/pcre_h.jl: $(PCRE_INCL_PATH)
@mkdir -p $(dir $@)
$(BUILDDIR)/pcre_h.jl: $(PCRE_INCL_PATH)
@$(call PRINT_PERL, $(CPP) -D PCRE2_CODE_UNIT_WIDTH=8 -dM $< | perl -nle '/^\s*#define\s+PCRE2_(\w*)\s*\(?($(PCRE_CONST))\)?u?\s*$$/ and print index($$1, "ERROR_") == 0 ? "const $$1 = Cint($$2)" : "const $$1 = UInt32($$2)"' | LC_ALL=C sort > $@)

$(build_datarootdir)/julia/src/errno_h.jl:
@mkdir -p $(dir $@)
$(BUILDDIR)/errno_h.jl:
@$(call PRINT_PERL, echo '#include <errno.h>' | $(CPP) -dM - | perl -nle 'print "const $$1 = Int32($$2)" if /^#define\s+(E\w+)\s+(\d+)\s*$$/' | LC_ALL=C sort > $@)

$(build_datarootdir)/julia/src/file_constants.jl: $(JULIAHOME)/src/file_constants.h
@mkdir -p $(dir $@)
$(BUILDDIR)/file_constants.jl: $(SRCDIR)/../src/file_constants.h
@$(call PRINT_PERL, $(CPP_STDOUT) -DJULIA $< | perl -nle 'print "$$1 0o$$2" if /^(\s*const\s+[A-z_]+\s+=)\s+(0[0-9]*)\s*$$/; print "$$1" if /^\s*(const\s+[A-z_]+\s+=\s+([1-9]|0x)[0-9A-z]*)\s*$$/' > $@)

$(build_datarootdir)/julia/src/uv_constants.jl: $(JULIAHOME)/src/uv_constants.h $(LIBUV_INC)/uv/errno.h
@mkdir -p $(dir $@)
$(BUILDDIR)/uv_constants.jl: $(SRCDIR)/../src/uv_constants.h $(LIBUV_INC)/uv/errno.h
@$(call PRINT_PERL, $(CPP_STDOUT) "-I$(LIBUV_INC)" -DJULIA $< | tail -n 16 > $@)

$(build_datarootdir)/julia/src/build_h.jl.phony: $(BUILDDIR)/build_h.jl.phony
$(BUILDDIR)/build_h.jl.phony:
@mkdir -p $(build_datarootdir)/julia/src
@echo "# This file is automatically generated in base/Makefile" > $@
ifeq ($(XC_HOST),)
@echo "const MACHINE = \"$(BUILD_MACHINE)\"" >> $@
Expand Down Expand Up @@ -109,44 +86,35 @@ endif

@# This to ensure that we always rebuild this file, but only when it is modified do we touch build_h.jl,
@# ensuring we rebuild the system image as infrequently as possible
@if ! cmp -s $@ $(build_datarootdir)/julia/src/build_h.jl; then \
@if ! cmp -s $@ build_h.jl; then \
$(call PRINT_PERL,) \
mv $@ $(build_datarootdir)/julia/src/build_h.jl; \
mv $@ build_h.jl; \
else \
rm -f $@; \
fi

$(build_datarootdir)/julia/src/version_git.jl.phony: $(BUILDDIR)/version_git.jl.phony
$(BUILDDIR)/version_git.jl.phony: $(SRCDIR)/version_git.sh
@mkdir -p $(build_datarootdir)/julia/src
ifneq ($(NO_GIT),1)
@sh $< $(SRCDIR) > $@
else ifeq ($(shell [ -f $(BUILDDIR)/version_git.jl ] && echo "true"), true)
@# Give warning if boilerplate git is found here
@if grep -q "Default output if git is not available" $(BUILDDIR)/version_git.jl; then \
echo "WARNING: Using boilerplate git version info" >&2; \
fi
@cp $(BUILDDIR)/version_git.jl $@
else ifeq ($(shell [ -f $(SRCDIR)/version_git.jl ] && echo "true"), true)
@# Give warning if boilerplate git is found here
@if grep -q "Default output if git is not available" $(SRCDIR)/version_git.jl; then \
echo "WARNING: Using boilerplate git version info" >&2; \
fi
@cp $(SRCDIR)/version_git.jl $@
else
$(warning "WARNING: Generating boilerplate git version info")
@sh $< $(SRCDIR) NO_GIT > $@
endif
ifneq ($(NO_GIT), 1)
sh $< $(SRCDIR) > $@
@# This to avoid touching version_git.jl when it is not modified,
@# so that the system image does not need to be rebuilt.
@if ! cmp -s $@ $(build_datarootdir)/julia/src/version_git.jl; then \
@if ! cmp -s $@ version_git.jl; then \
$(call PRINT_PERL,) \
mv $@ $(build_datarootdir)/julia/src/version_git.jl; \
mv $@ version_git.jl; \
else \
rm -f $@; \
fi
$(BUILDDIR)/version_git.jl: $(SRCDIR)/version_git.sh
sh $< $(SRCDIR) > $@
else
ifeq ($(shell [ -f $(BUILDDIR)/version_git.jl ] && echo "true"), true)
@# Give warning if boilerplate git is used
@if grep -q "Default output if git is not available" $(BUILDDIR)/version_git.jl; then \
echo "WARNING: Using boilerplate git version info" >&2; \
fi
else
$(warning "WARNING: Generating boilerplate git version info")
@sh $(SRCDIR)/version_git.sh $(SRCDIR) NO_GIT > $(BUILDDIR)/version_git.jl
endif
endif

ifeq (,$(filter $(OS), WINNT emscripten))
# For any USE_SYSTEM_* libraries that will be dynamically loaded by libjulia,
Expand Down Expand Up @@ -194,7 +162,7 @@ endif
define symlink_system_library
libname_$2 := $$(notdir $(call versioned_libname,$2,$3))
libpath_$2 := $$(shell $$(call spawn,$$(LIBWHICH)) -p $$(libname_$2) 2>/dev/null)
symlink_$2: $$(build_private_libdir)/$$(libname_$2) .FORCE
symlink_$2: $$(build_private_libdir)/$$(libname_$2)
$$(build_private_libdir)/$$(libname_$2):
@if [ -e "$$(libpath_$2)" ]; then \
REALPATH=$$(libpath_$2); \
Expand Down Expand Up @@ -300,10 +268,7 @@ endif

symlink_system_libraries: $(SYMLINK_SYSTEM_LIBRARIES)

.FORCE:
.PHONY: $(BUILDDIR)/version_git.jl $(BUILDDIR)/version_git.jl.phony $(build_datarootdir)/julia/src/version_git.jl.phony \
$(BUILDDIR)/build_h.jl.phony $(build_datarootdir)/julia/src/build_h.jl.phony \
clean all .FORCE
.PHONY: $(BUILDDIR)/build_h.jl.phony $(BUILDDIR)/version_git.jl.phony clean all symlink_*

clean:
-rm -f $(BUILDDIR)/pcre_h.jl
Expand All @@ -315,5 +280,4 @@ clean:
-rm -f $(BUILDDIR)/file_constants.jl
-rm -f $(BUILDDIR)/version_git.jl
-rm -f $(BUILDDIR)/version_git.jl.phony
-rm -rf $(build_datarootdir)/julia/src/*
-rm -f $(build_private_libdir)/lib*.$(SHLIB_EXT)*
2 changes: 1 addition & 1 deletion base/cpuid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Base.:<=(a::ISA, b::ISA) = a.features <= b.features
Base.:<(a::ISA, b::ISA) = a.features < b.features
Base.isless(a::ISA, b::ISA) = a < b

include("../features_h.jl")
include(string(length(Core.ARGS) >= 2 ? Core.ARGS[2] : "", "features_h.jl")) # include($BUILDROOT/base/features_h.jl)

# Keep in sync with `arch_march_isa_mapping`.
const ISAs_by_family = Dict(
Expand Down
2 changes: 1 addition & 1 deletion base/filesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ uv_fs_req_cleanup(req) = ccall(:uv_fs_req_cleanup, Cvoid, (Ptr{Cvoid},), req)
include("path.jl")
include("stat.jl")
include("file.jl")
include("../file_constants.jl")
include(string(length(Core.ARGS) >= 2 ? Core.ARGS[2] : "", "file_constants.jl")) # include($BUILDROOT/base/file_constants.jl)

## Operations with File (fd) objects ##

Expand Down
6 changes: 3 additions & 3 deletions base/initdefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function append_default_depot_path!(DEPOT_PATH)
path in DEPOT_PATH || push!(DEPOT_PATH, path)
path = abspath(Sys.BINDIR, "..", "share", "julia")
path in DEPOT_PATH || push!(DEPOT_PATH, path)
return DEPOT_PATH
end

function init_depot_path()
Expand All @@ -112,7 +111,6 @@ function init_depot_path()
else
append_default_depot_path!(DEPOT_PATH)
end
nothing
end

## LOAD_PATH & ACTIVE_PROJECT ##
Expand Down Expand Up @@ -222,7 +220,9 @@ function parse_load_path(str::String)
end

function init_load_path()
if haskey(ENV, "JULIA_LOAD_PATH")
if Base.creating_sysimg
paths = ["@stdlib"]
elseif haskey(ENV, "JULIA_LOAD_PATH")
paths = parse_load_path(ENV["JULIA_LOAD_PATH"])
else
paths = filter!(env -> env !== nothing,
Expand Down
2 changes: 1 addition & 1 deletion base/libc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if Sys.iswindows()
export GetLastError, FormatMessage
end

include("../errno_h.jl")
include(string(length(Core.ARGS) >= 2 ? Core.ARGS[2] : "", "errno_h.jl")) # include($BUILDROOT/base/errno_h.jl)

## RawFD ##

Expand Down
2 changes: 1 addition & 1 deletion base/libuv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Core definitions for interacting with the libuv library from Julia

include("../uv_constants.jl")
include(string(length(Core.ARGS) >= 2 ? Core.ARGS[2] : "", "uv_constants.jl")) # include($BUILDROOT/base/uv_constants.jl)

# convert UV handle data to julia object, checking for null
function uv_sizeof_handle(handle)
Expand Down
4 changes: 2 additions & 2 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ elseif Sys.isapple()
# char filename[max_filename_length];
# };
# Buffer buf;
# getattrlist(path, &attr_list, &buf, sizeof(buf), FSOPT_);
# getattrpath(path, &attr_list, &buf, sizeof(buf), FSOPT_);
function isfile_casesensitive(path)
isaccessiblefile(path) || return false
path_basename = String(basename(path))
Expand Down Expand Up @@ -813,7 +813,7 @@ end

function find_source_file(path::AbstractString)
(isabspath(path) || isfile(path)) && return path
base_path = joinpath(Sys.BINDIR, DATAROOTDIR, "julia", "src", "base", path)
base_path = joinpath(Sys.BINDIR, DATAROOTDIR, "julia", "base", path)
return isfile(base_path) ? normpath(base_path) : nothing
end

Expand Down
3 changes: 2 additions & 1 deletion base/pcre.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module PCRE

import ..RefValue

include("../pcre_h.jl")
# include($BUILDROOT/base/pcre_h.jl)
include(string(length(Core.ARGS) >= 2 ? Core.ARGS[2] : "", "pcre_h.jl"))

const PCRE_LIB = "libpcre2-8"

Expand Down
9 changes: 5 additions & 4 deletions base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import Base.MainInclude: eval, include
pushfirst!(Base._included_files, (@__MODULE__, joinpath(@__DIR__, "Base.jl")))
pushfirst!(Base._included_files, (@__MODULE__, joinpath(@__DIR__, "sysimg.jl")))

# set up depot & load paths to be able to find stdlib packages
@eval Base creating_sysimg = true
Base.init_depot_path()
Base.init_load_path()

if Base.is_primary_base_module
# load some stdlib packages but don't put their names in Main
let
# set up depot & load paths to be able to find stdlib packages
push!(empty!(LOAD_PATH), "@stdlib")
Base.append_default_depot_path!(DEPOT_PATH)

# Stdlibs sorted in dependency, then alphabetical, order by contrib/print_sorted_stdlibs.jl
# Run with the `--exclude-jlls` option to filter out all JLL packages
stdlibs = [
Expand Down
Loading

0 comments on commit 0386f83

Please sign in to comment.