diff --git a/features/common/BUILD.bazel b/features/common/BUILD.bazel index 9bcf663..9671602 100644 --- a/features/common/BUILD.bazel +++ b/features/common/BUILD.bazel @@ -183,6 +183,25 @@ feature( ], ) +feature( + name = "minsize", + enabled = False, + flag_sets = [ + flag_set( + actions = C_ALL_COMPILE_ACTIONS + CPP_ALL_COMPILE_ACTIONS + LD_ALL_ACTIONS, + flag_groups = [ + flag_group( + flags = [ + "-Oz", + # Inline slightly more which is actually smaller. + "-mllvm", "--inline-threshold=10", + ], + ), + ], + ), + ], +) + feature( name = "symbol_garbage_collection", enabled = True, @@ -322,6 +341,7 @@ feature_set( ":exceptions", ":use_lld", ":lto", + ":minsize", ":symbol_garbage_collection", ":dbg", ":fastbuild",