mirror of
https://github.com/rui314/mold.git
synced 2024-09-11 13:06:59 +03:00
Add --no-detach to write to a separate debug file in the foreground
--detach is the default.
This commit is contained in:
parent
97a1e218c5
commit
18da5b654e
@ -85,6 +85,8 @@ Options:
|
|||||||
--defsym=SYMBOL=VALUE Define a symbol alias
|
--defsym=SYMBOL=VALUE Define a symbol alias
|
||||||
--demangle Demangle C++ symbols in log messages (default)
|
--demangle Demangle C++ symbols in log messages (default)
|
||||||
--no-demangle
|
--no-demangle
|
||||||
|
--detach Create separate debug info file in the background (default)
|
||||||
|
--no-detach
|
||||||
--enable-new-dtags Emit DT_RUNPATH for --rpath (default)
|
--enable-new-dtags Emit DT_RUNPATH for --rpath (default)
|
||||||
--disable-new-dtags Emit DT_RPATH for --rpath
|
--disable-new-dtags Emit DT_RPATH for --rpath
|
||||||
--execute-only Make executable segments unreadable
|
--execute-only Make executable segments unreadable
|
||||||
@ -759,6 +761,10 @@ std::vector<std::string> parse_nonpositional_args(Context<E> &ctx) {
|
|||||||
ctx.arg.demangle = true;
|
ctx.arg.demangle = true;
|
||||||
} else if (read_flag("no-demangle")) {
|
} else if (read_flag("no-demangle")) {
|
||||||
ctx.arg.demangle = false;
|
ctx.arg.demangle = false;
|
||||||
|
} else if (read_flag("detach")) {
|
||||||
|
ctx.arg.detach = true;
|
||||||
|
} else if (read_flag("no-detach")) {
|
||||||
|
ctx.arg.detach = false;
|
||||||
} else if (read_flag("default-symver")) {
|
} else if (read_flag("default-symver")) {
|
||||||
ctx.arg.default_symver = true;
|
ctx.arg.default_symver = true;
|
||||||
} else if (read_flag("noinhibit-exec")) {
|
} else if (read_flag("noinhibit-exec")) {
|
||||||
@ -1413,6 +1419,10 @@ std::vector<std::string> parse_nonpositional_args(Context<E> &ctx) {
|
|||||||
if (ctx.arg.shared && warn_shared_textrel)
|
if (ctx.arg.shared && warn_shared_textrel)
|
||||||
ctx.arg.warn_textrel = true;
|
ctx.arg.warn_textrel = true;
|
||||||
|
|
||||||
|
// We don't want the background process to write to stdout
|
||||||
|
if (ctx.arg.stats || ctx.arg.perf)
|
||||||
|
ctx.arg.detach = false;
|
||||||
|
|
||||||
ctx.arg.undefined.push_back(ctx.arg.entry);
|
ctx.arg.undefined.push_back(ctx.arg.entry);
|
||||||
|
|
||||||
for (i64 i = 0; i < ctx.arg.defsyms.size(); i++) {
|
for (i64 i = 0; i < ctx.arg.defsyms.size(); i++) {
|
||||||
|
@ -1740,6 +1740,7 @@ struct Context {
|
|||||||
bool color_diagnostics = false;
|
bool color_diagnostics = false;
|
||||||
bool default_symver = false;
|
bool default_symver = false;
|
||||||
bool demangle = true;
|
bool demangle = true;
|
||||||
|
bool detach = true;
|
||||||
bool discard_all = false;
|
bool discard_all = false;
|
||||||
bool discard_locals = false;
|
bool discard_locals = false;
|
||||||
bool eh_frame_hdr = true;
|
bool eh_frame_hdr = true;
|
||||||
|
@ -3058,7 +3058,7 @@ void write_separate_debug_file(Context<E> &ctx) {
|
|||||||
|
|
||||||
// We want to write to the debug info file in background so that the
|
// We want to write to the debug info file in background so that the
|
||||||
// user doesn't have to wait for it to complete.
|
// user doesn't have to wait for it to complete.
|
||||||
if (!ctx.arg.stats && !ctx.arg.perf)
|
if (ctx.arg.detach)
|
||||||
notify_parent();
|
notify_parent();
|
||||||
|
|
||||||
// A debug info file contains all sections as the original file, though
|
// A debug info file contains all sections as the original file, though
|
||||||
|
Loading…
Reference in New Issue
Block a user