drop-flags-unsupported-by-clang16.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
  2. index 80bc79e5fb3..13b200e4cb0 100644
  3. --- a/build/config/compiler/BUILD.gn
  4. +++ b/build/config/compiler/BUILD.gn
  5. @@ -616,24 +616,6 @@ config("compiler") {
  6. }
  7. }
  8. - # TODO(crbug.com/1488374): This causes binary size growth and potentially
  9. - # other problems.
  10. - # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
  11. - if (default_toolchain != "//build/toolchain/cros:target" &&
  12. - !llvm_android_mainline) {
  13. - cflags += [
  14. - "-mllvm",
  15. - "-split-threshold-for-reg-with-hint=0",
  16. - ]
  17. - if (use_thin_lto && is_a_target_toolchain) {
  18. - if (is_win) {
  19. - ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
  20. - } else {
  21. - ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
  22. - }
  23. - }
  24. - }
  25. -
  26. # TODO(crbug.com/1235145): Investigate why/if this should be needed.
  27. if (is_win) {
  28. cflags += [ "/clang:-ffp-contract=off" ]
  29. @@ -768,7 +750,6 @@ config("compiler") {
  30. ldflags += [
  31. "/opt:lldltojobs=all",
  32. "-mllvm:-import-instr-limit=$import_instr_limit",
  33. - "-mllvm:-disable-auto-upgrade-debug-info",
  34. ]
  35. } else {
  36. ldflags += [ "-flto=thin" ]
  37. @@ -800,13 +781,6 @@ config("compiler") {
  38. if (is_apple) {
  39. ldflags += [ "-Wcrl,object_path_lto" ]
  40. }
  41. - if (!is_chromeos) {
  42. - # TODO(https://crbug.com/972449): turn on for ChromeOS when that
  43. - # toolchain has this flag.
  44. - # We only use one version of LLVM within a build so there's no need to
  45. - # upgrade debug info, which can be expensive since it runs the verifier.
  46. - ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
  47. - }
  48. }
  49. # TODO(https://crbug.com/1211155): investigate why this isn't effective on