Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Apr 17, 2020
1 parent ec5e506 commit 29feef7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions contrib/relative_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@
# shells and whatnot during the build are all POSIX shells/cygwin. We rely on the build
# system itself to canonicalize to `\` when it needs to, and deal with the shell escaping
# and whatnot at the latest possible moment.
sys.stdout.write(os.path.relpath(sys.argv[2], sys.argv[1]).replace(os.path.sep, '/'))

# Always print a trailing slash if this is a directory
if os.path.isdir(sys.argv[2]):
sys.stdout.write("/")
sys.stdout.write(os.path.relpath(sys.argv[2], sys.argv[1]).replace(os.path.sep, '/'))
2 changes: 1 addition & 1 deletion sysimage.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ BASE_SRCS := $(sort $(shell find $(JULIAHOME)/base -name \*.jl -and -not -name s
$(shell find $(BUILDROOT)/base -name \*.jl -and -not -name sysimg.jl))
STDLIB_SRCS := $(JULIAHOME)/base/sysimg.jl $(shell find $(build_datarootdir)/julia/stdlib/$(VERSDIR)/*/src -name \*.jl) \
$(build_prefix)/manifest/Pkg
RELBUILDROOT := $(call rel_path,$(JULIAHOME)/base,$(BUILDROOT)/base)
RELBUILDROOT := $(call rel_path,$(JULIAHOME)/base,$(BUILDROOT)/base)/ # <-- make sure this always has a trailing slash

$(build_private_libdir)/corecompiler.ji: $(COMPILER_SRCS)
@$(call PRINT_JULIA, cd $(JULIAHOME)/base && \
Expand Down
3 changes: 2 additions & 1 deletion test/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ try
@test_throws ErrorException Base.read_dependency_src(cachefile, joinpath(dir, "foo.jl"))

modules, deps1 = Base.cache_dependencies(cachefile)
stdlib_modules = filter(s -> Base.identify_package(s) !== nothing, readdir(Sys.STDLIB))
@test Dict(modules) == merge(
Dict(let m = Base.PkgId(s)
m => Base.module_build_id(Base.root_module(m))
Expand All @@ -267,7 +268,7 @@ try
# plus modules included in the system image
Dict(let m = Base.root_module(Base, s)
Base.PkgId(m) => Base.module_build_id(m)
end for s in Symbol.(readdir(Sys.STDLIB))),
end for s in Symbol.(stdlib_modules)),
# Plus precompilation module generated at build time
let id = Base.PkgId("__PackagePrecompilationStatementModule")
Dict(id => Base.module_build_id(Base.root_module(id)))
Expand Down

0 comments on commit 29feef7

Please sign in to comment.