Skip to content

Commit

Permalink
sysinfo: export Sys.STDLIB path to stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Jun 19, 2018
1 parent 931156b commit b2eef2e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions base/sysinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Provide methods for retrieving information about hardware and the operating syst
""" Sys

export BINDIR,
STDLIB,
CPU_CORES,
CPU_NAME,
WORD_SIZE,
Expand Down Expand Up @@ -37,6 +38,13 @@ A string containing the full path to the directory containing the `julia` execut
"""
:BINDIR

"""
Sys.STDLIB
A string containing the full path to the directory containing the `stdlib` packages.
"""
:STDLIB

# helper to avoid triggering precompile warnings

global CPU_CORES
Expand Down Expand Up @@ -94,6 +102,8 @@ function __init__()
global CPU_NAME = ccall(:jl_get_cpu_name, Ref{String}, ())
global JIT = ccall(:jl_get_JIT, Ref{String}, ())
global BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String
vers = "v$(VERSION.major).$(VERSION.minor)"
global STDLIB = abspath(BINDIR, "..", "share", "julia", "stdlib", vers)
nothing
end

Expand Down

0 comments on commit b2eef2e

Please sign in to comment.