Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index fb8551a3f4385b71736438baa9d929d4ca35f896..a1199da0a08e2edcaa51cf4622d9a04e8a5c99fc 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -31,6 +31,9 @@ declare_args() { |
# Embeds the given script into the snapshot. |
v8_embed_script = "" |
+ # Support for backtrace_symbols on linux. |
+ v8_enable_backtrace = false |
+ |
# Sets -dENABLE_DISASSEMBLER. |
v8_enable_disassembler = false |
@@ -292,6 +295,10 @@ config("toolchain") { |
# TODO(jochen): Add support for compiling with simulators. |
if (is_debug) { |
+ if (is_linux && v8_enable_backtrace) { |
+ ldflags += [ "-rdynamic" ] |
+ } |
+ |
# TODO(jochen): Add support for different debug optimization levels. |
defines += [ |
"ENABLE_DISASSEMBLER", |