From 80833ed703f81f6aa5bdfed42d5dbbacb77d06bf Mon Sep 17 00:00:00 2001 From: "Brett R. Toomey" Date: Sun, 3 Jun 2018 17:12:30 +0200 Subject: [PATCH] Dsymutil fixes for macOS --- src/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a616433f8..8cf4b26b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1064,6 +1064,21 @@ int main(int arg_count, char **arg_ptr) { return exit_code; } + #if defined(GB_SYSTEM_OSX) + if (BuildFlag_Debug) { + // NOTE: macOS links DWARF symbols dynamically. Dsymutil will map the stubs in the exe + // to the symbols in the object file + exit_code = system_exec_command_line_app("dsymutil", true, + "%.*s%s", LIT(output_base), output_ext + ); + + if (exit_code != 0) { + return exit_code; + } + } + #endif + + if (build_context.show_timings) { show_timings(&checker, &timings); }