GN: link executables with -rdynamic on Linux.

-rdynamic makes sure the executable exposes all its symbols, which allows things like DM's built-in stack trace dumper to show symbols instead of just addresses.  We do this in GYP too.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339983005

Review-Url: https://codereview.chromium.org/2339983005
This commit is contained in:
mtklein 2016-09-15 10:44:15 -07:00 committed by Commit bot
parent d8c2476a8b
commit a846c7223c

View File

@ -153,7 +153,10 @@ config("executable") {
if (is_mac) {
ldflags = [ "-Wl,-rpath,@loader_path/." ]
} else if (is_linux) {
ldflags = [ "-Wl,-rpath,\$ORIGIN" ]
ldflags = [
"-rdynamic",
"-Wl,-rpath,\$ORIGIN",
]
}
}