Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. Open file:
  2.  
  3. D:\depot_tools\chromium\src\third_party\blink\renderer\core\core.gni
  4.  
  5. Change :
  6.  
  7. core_config_add += [ "//build/config/compiler:optimize_max" ]
  8.  
  9. To:
  10.  
  11. core_config_add += [ "//build/config/compiler:optimize_blink" ]
  12.  
  13. Open file:
  14.  
  15. D:\depot_tools\chromium\src\build\config\compiler\BUILD.gn
  16.  
  17. Add an optimize_blink somewhere in the optimization section starting around line 2100:
  18.  
  19. config("optimize_blink") {
  20. if (is_nacl && is_nacl_irt) {
  21. # The NaCl IRT is a special case and always wants its own config.
  22. # Various components do:
  23. # if (!is_debug) {
  24. # configs -= [ "//build/config/compiler:default_optimization" ]
  25. # configs += [ "//build/config/compiler:optimize_max" ]
  26. # }
  27. # So this config has to have the selection logic just like
  28. # "default_optimization", below.
  29. configs = [ "//build/config/nacl:irt_optimize" ]
  30. } else {
  31. ldflags = common_optimize_on_ldflags
  32. if (is_win) {
  33. # Favor speed over size, /O2 must be before the common flags. The GYP
  34. # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2.
  35. cflags = [ "/O2" ] + common_optimize_on_cflags
  36.  
  37. if (is_official_build) {
  38. if (!is_clang) {
  39. cflags += [ "/GL" ] # Whole program optimization.
  40. }
  41. # TODO(crbug.com/598772): Enable -flto for Clang.
  42. }
  43. } else if (optimize_for_fuzzing) {
  44. cflags = [ "-O1" ] + common_optimize_on_cflags
  45. } else {
  46. cflags = [ "-O2" ] + common_optimize_on_cflags
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement