c++macosclang

What is clang's equivalent to -rdynamic gcc flag?


I can't find any similar option that would include all the function names into the final release binary. Or does clang do it by default?


Solution

  • At least clang 3.3 seems to support -rdynamic though neither clang --help nor the manpage documents it. (If you are on OSX, -rdynamic isn't needed)

    gcc -rdynamic says "-rdynamic Pass the flag --export-dynamic to the ELF linker, on targets that support it."

    So clang should also be able to do the same with -Wl,--export-dynamic.