From 1164723299ca95dc4ba56f9729522b459178bf26 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Tue, 16 Feb 2021 21:05:06 -0500 Subject: [PATCH] Make it an argument --- build/config/compiler/BUILD.gn | 6 +++--- build/config/compiler/compiler.gni | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index f7f4c3f0725b6d..311f45470328f4 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -330,10 +330,10 @@ config("no_unwind_tables") { } config("unwind_tables_default") { - if (current_os == "android") { - configs = [ ":unwind_tables" ] - } else { + if (exclude_unwind_tables) { configs = [ ":no_unwind_tables" ] + } else { + configs = [ ":unwind_tables" ] } } diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index a524bfeb3915a4..61c47f24e8832f 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -31,4 +31,7 @@ declare_args() { # Enable position independent executables (-pie). enable_pie = current_os == "linux" + + # Remove unwind tables from the binary to save space. + exclude_unwind_tables = current_os != "android" }