drop-flags-unsupported-by-clang16 (1).patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
  2. index 89b4755ac8b3..94b457385663 100644
  3. --- a/build/config/compiler/BUILD.gn
  4. +++ b/build/config/compiler/BUILD.gn
  5. @@ -618,24 +618,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. @@ -802,10 +784,6 @@ config("compiler") {
  30. if (is_apple) {
  31. ldflags += [ "-Wcrl,object_path_lto" ]
  32. }
  33. -
  34. - # We only use one version of LLVM within a build so there's no need to
  35. - # upgrade debug info, which can be expensive since it runs the verifier.
  36. - ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
  37. }
  38. # TODO(https://crbug.com/1211155): investigate why this isn't effective on