From b2eef2e34a50540551e4ee07f8846d502c952290 Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Fri, 15 Jun 2018 15:55:53 -0400 Subject: [PATCH] sysinfo: export Sys.STDLIB path to stdlib --- base/sysinfo.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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