aboutsummaryrefslogtreecommitdiff
path: root/src/link.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-18 21:06:53 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-18 21:06:53 -0400
commit46ddeb0bafd68cf88867e4268253a41ac0050215 (patch)
tree41f05646aa4707ee86df9d33b7c3c2ab3d5cf3ca /src/link.cpp
parent10ad3253de4dad4675fbd84da874f2cd73cd2deb (diff)
downloadzig-46ddeb0bafd68cf88867e4268253a41ac0050215.tar.gz
zig-46ddeb0bafd68cf88867e4268253a41ac0050215.zip
add --verbose-link option
only prints the link line
Diffstat (limited to 'src/link.cpp')
-rw-r--r--src/link.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/link.cpp b/src/link.cpp
index dae68c2814..9a26139e5b 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -37,6 +37,7 @@ static Buf *build_o_raw(CodeGen *parent_gen, const char *oname, Buf *full_path)
codegen_set_omit_zigrt(child_gen, true);
child_gen->want_h_file = false;
+ child_gen->verbose_link = parent_gen->verbose_link;
codegen_set_cache_dir(child_gen, parent_gen->cache_dir);
@@ -816,7 +817,7 @@ void codegen_link(CodeGen *g, const char *out_file) {
fprintf(stderr, "---------------\n");
LLVMDumpModule(g->module);
}
- if (g->verbose) {
+ if (g->verbose || g->verbose_link) {
fprintf(stderr, "\nLink:\n");
fprintf(stderr, "-------\n");
}
@@ -840,7 +841,7 @@ void codegen_link(CodeGen *g, const char *out_file) {
zig_panic("unable to rename object file into final output: %s", err_str(err));
}
}
- if (g->verbose) {
+ if (g->verbose || g->verbose_link) {
fprintf(stderr, "OK\n");
}
return;
@@ -860,7 +861,7 @@ void codegen_link(CodeGen *g, const char *out_file) {
construct_linker_job(&lj);
- if (g->verbose) {
+ if (g->verbose || g->verbose_link) {
for (size_t i = 0; i < lj.args.length; i += 1) {
const char *space = (i != 0) ? " " : "";
fprintf(stderr, "%s%s", space, lj.args.at(i));
@@ -878,7 +879,7 @@ void codegen_link(CodeGen *g, const char *out_file) {
codegen_add_time_event(g, "Done");
- if (g->verbose) {
+ if (g->verbose || g->verbose_link) {
fprintf(stderr, "OK\n");
}
}