Skip to content

Commit

Permalink
Fix issue with debug symbols in emcc builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Oct 30, 2023
1 parent 9ffd35e commit 5911ca8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/lang/c/src/gcc/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void gcc_add_misc(
if (!is_emcc()) {
ut_strbuf_appendstr(cmd, " -g");
} else {
ut_strbuf_appendstr(cmd, " -gsource-map");
ut_strbuf_appendstr(cmd, " -g -gsource-map");
}
}

Expand Down Expand Up @@ -338,6 +338,10 @@ void gcc_add_misc_link(
ut_strbuf_appendstr(cmd, " -s ASSERTIONS=2");
}
}

if (config->symbols) {
ut_strbuf_appendstr(cmd, " -g -gsource-map");
}
}

gcc_add_sanitizers(config, cmd);
Expand Down

0 comments on commit 5911ca8

Please sign in to comment.