Skip to content

Commit

Permalink
Fixes: ERROR: dlext not defined
Browse files Browse the repository at this point in the history
Fixes: ERROR: `dlext` not defined

Seems to be forgotten when parts of `Sys` moved to `Libdl`
  • Loading branch information
peter1000 committed Mar 30, 2015
1 parent dc9d7b6 commit 123e18a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions contrib/build_executable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function build_executable(exename, script_file, targetdir=nothing; force=false)
sys = SysFile(exename)

if !force
for f in [cfile, userimgjl, "$(sys.buildfile).$(Sys.dlext)", "$(sys.buildfile).ji", exe_release.buildfile, exe_debug.buildfile]
for f in [cfile, userimgjl, "$(sys.buildfile).$(Libdl.dlext)", "$(sys.buildfile).ji", exe_release.buildfile, exe_debug.buildfile]
if isfile(f)
println("ERROR: File '$(f)' already exists. Delete it or use --force.")
return 1
Expand Down Expand Up @@ -135,12 +135,12 @@ function build_executable(exename, script_file, targetdir=nothing; force=false)

if targetdir != nothing
# Move created files to target directory
for file in [exe_release.buildfile, exe_debug.buildfile, sys.buildfile*".$(Sys.dlext)", sys.buildfile*".ji"]
for file in [exe_release.buildfile, exe_debug.buildfile, sys.buildfile*".$(Libdl.dlext)", sys.buildfile*".ji"]
mv(file,joinpath(targetdir, basename(file)))
end

# Copy needed shared libraries to the target directory
tmp = ".*\.$(Sys.dlext).*"
tmp = ".*\.$(Libdl.dlext).*"
shlibs = filter(Regex(tmp),readdir(sys.buildpath))
for shlib in shlibs
cp(joinpath(sys.buildpath, shlib), joinpath(targetdir, shlib))
Expand Down
8 changes: 4 additions & 4 deletions contrib/build_sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function build_sysimg(sysimg_path=default_sysimg_path, cpu_target="native", user
# Quit out if a sysimg is already loaded and is in the same spot as sysimg_path, unless forcing
sysimg = dlopen_e("sys")
if sysimg != C_NULL
if !force && Base.samefile(Libdl.dlpath(sysimg), "$(sysimg_path).$(Sys.dlext)")
if !force && Base.samefile(Libdl.dlpath(sysimg), "$(sysimg_path).$(Libdl.dlext)")
info("System image already loaded at $(Libdl.dlpath(sysimg)), set force to override")
return
end
Expand Down Expand Up @@ -130,10 +130,10 @@ function link_sysimg(sysimg_path=default_sysimg_path, ld=find_system_linker())
end
@windows_only append!(FLAGS, ["-ljulia", "-lssp-0"])

info("Linking sys.$(Sys.dlext)")
run(`$ld $FLAGS -o $sysimg_path.$(Sys.dlext) $sysimg_path.o`)
info("Linking sys.$(Libdl.dlext)")
run(`$ld $FLAGS -o $sysimg_path.$(Libdl.dlext) $sysimg_path.o`)

info("System image successfully built at $sysimg_path.$(Sys.dlext)")
info("System image successfully built at $sysimg_path.$(Libdl.dlext)")
@windows_only begin
if convert(VersionNumber, Base.libllvm_version) < v"3.5.0"
LLVM_msg = "Building sys.dll on Windows against LLVM < 3.5.0 can cause incorrect backtraces!"
Expand Down

0 comments on commit 123e18a

Please sign in to comment.