aboutsummaryrefslogtreecommitdiff
path: root/src/link.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-20 12:52:54 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-20 12:52:54 -0400
commit3c41c2d84b8de5a95a322a3f0d8424adf6df8667 (patch)
tree0a0722e68311711a6b9dafafa3c713184cd13306 /src/link.cpp
parent32c51e015674af346aae1c3f40fed9ef098a6693 (diff)
parentc4a54377e3f07bbd2f9c54c1962c7941792c2c1f (diff)
downloadzig-3c41c2d84b8de5a95a322a3f0d8424adf6df8667.tar.gz
zig-3c41c2d84b8de5a95a322a3f0d8424adf6df8667.zip
Merge branch 'master' into c-to-zig
Diffstat (limited to 'src/link.cpp')
-rw-r--r--src/link.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/link.cpp b/src/link.cpp
index dae68c2814..0ee0b49d01 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);
@@ -347,6 +348,10 @@ static void construct_linker_job_coff(LinkJob *lj) {
lj->args.append("-NOLOGO");
+ if (!g->strip_debug_symbols) {
+ lj->args.append("-DEBUG");
+ }
+
coff_append_machine_arg(g, &lj->args);
if (g->windows_subsystem_windows) {
@@ -816,7 +821,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 +845,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 +865,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 +883,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");
}
}