diff --git a/base/sysinfo.jl b/base/sysinfo.jl index da6dea9f59c32..4f9af8d072982 100644 --- a/base/sysinfo.jl +++ b/base/sysinfo.jl @@ -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, @@ -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 @@ -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