Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Open file:
- D:\depot_tools\chromium\src\third_party\blink\renderer\core\core.gni
- Change :
- core_config_add += [ "//build/config/compiler:optimize_max" ]
- To:
- core_config_add += [ "//build/config/compiler:optimize_blink" ]
- Open file:
- D:\depot_tools\chromium\src\build\config\compiler\BUILD.gn
- Add an optimize_blink somewhere in the optimization section starting around line 2100:
- config("optimize_blink") {
- if (is_nacl && is_nacl_irt) {
- # The NaCl IRT is a special case and always wants its own config.
- # Various components do:
- # if (!is_debug) {
- # configs -= [ "//build/config/compiler:default_optimization" ]
- # configs += [ "//build/config/compiler:optimize_max" ]
- # }
- # So this config has to have the selection logic just like
- # "default_optimization", below.
- configs = [ "//build/config/nacl:irt_optimize" ]
- } else {
- ldflags = common_optimize_on_ldflags
- if (is_win) {
- # Favor speed over size, /O2 must be before the common flags. The GYP
- # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2.
- cflags = [ "/O2" ] + common_optimize_on_cflags
- if (is_official_build) {
- if (!is_clang) {
- cflags += [ "/GL" ] # Whole program optimization.
- }
- # TODO(crbug.com/598772): Enable -flto for Clang.
- }
- } else if (optimize_for_fuzzing) {
- cflags = [ "-O1" ] + common_optimize_on_cflags
- } else {
- cflags = [ "-O2" ] + common_optimize_on_cflags
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement