From 16301910f98413ec46873e35e7b6c2322f8e9e69 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 01:24:28 +0100 Subject: [PATCH] Docs for Base.julia_cmd(). News and compat annotation for #29858 (capture --inline flag in julia_cmd). --- NEWS.md | 1 + base/util.jl | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/NEWS.md b/NEWS.md index fc764597599a5..c47ae3ffefec9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -49,6 +49,7 @@ Standard library changes the returned array ([#29670]). * The process id is appended to malloc log files in order to track memory allocations of multiple processes ([#29969]). + * `Base.julia_cmd` now propagates the `--inline=(yes|no)` flag ([#29858]). Compiler/Runtime improvements ----------------------------- diff --git a/base/util.jl b/base/util.jl index 10527c8d9caa1..886654959a6b6 100644 --- a/base/util.jl +++ b/base/util.jl @@ -399,7 +399,16 @@ printstyled(io::IO, msg...; bold::Bool=false, color::Union{Int,Symbol}=:normal) with_output_color(print, color, io, msg...; bold=bold) printstyled(msg...; bold::Bool=false, color::Union{Int,Symbol}=:normal) = printstyled(stdout, msg...; bold=bold, color=color) +""" + Base.julia_cmd(juliapath=joinpath(Sys.BINDIR::String, julia_exename())) + +Return a julia command similar to the one of the running process. +Propagates the `--cpu-target`, `--sysimage`, --compile `, `--depwarn` +and `--inline` command line arguments. +!!! compat "Julia 1.1" + The `--inline` flag is only propagated in Julia 1.1 and later. +""" function julia_cmd(julia=joinpath(Sys.BINDIR::String, julia_exename())) opts = JLOptions() cpu_target = unsafe_string(opts.cpu_target)