commit 5e3a8916524f18a570342c82acd038b80a8cf9a4
parent 249d5d6d9df717d45a0681fcdb101a51b39f6410
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sat, 9 Apr 2016 15:07:45 -0600
src: extend --defsym hack to osx
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/instrument_main.cc b/src/instrument_main.cc
@@ -205,8 +205,14 @@ main(int argc, char *argv[])
last_node_ifstream.close();
std::stringstream defsym_arg;
+#ifdef __APPLE__
+ defsym_arg << "-Wl,-alias,__citrun_node_";
+ defsym_arg << last_node;
+ defsym_arg << ",__citrun_tu_head";
+#else
defsym_arg << "-Wl,--defsym=_citrun_tu_head=_citrun_node_";
defsym_arg << last_node;
+#endif
// Add the runtime library and the symbol define hack
// automatically to the command line