Skip to content

Commit 96d82aa

Browse files
authored
Reenable LTO which has a huge effect on performance. (proxy-wasm#44)
Signed-off-by: John Plevyak <[email protected]>
1 parent e25262d commit 96d82aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toolchain/cc_toolchain_config.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _impl(ctx):
131131
actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
132132
flag_groups = [
133133
flag_group(
134-
flags = ["-O3", "-ffunction-sections", "-fdata-sections"],
134+
flags = ["-O3", "-ffunction-sections", "-fdata-sections", "--llvm-lto", "1", "-flto"],
135135
),
136136
],
137137
),
@@ -141,7 +141,7 @@ def _impl(ctx):
141141
ACTION_NAMES.cpp_link_nodeps_dynamic_library,
142142
ACTION_NAMES.cpp_link_executable,
143143
],
144-
flag_groups = [flag_group(flags = ["-Wl,--gc-sections"])],
144+
flag_groups = [flag_group(flags = ["-O3", "-Wl,--gc-sections", "--llvm-lto", "1", "-flto"])],
145145
),
146146
],
147147
)

0 commit comments

Comments
 (0)