0011-build-config-compiler-remove-flags-not-available-in-.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From 1cce24d3de450d4ea65b66886f64b3a769d119d3 Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Mon, 17 Jan 2022 08:15:52 +0000
  4. Subject: [PATCH 11/22] build: config: compiler: remove flags not available in
  5. custom clang
  6. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  7. ---
  8. build/config/compiler/BUILD.gn | 13 -------------
  9. 1 file changed, 13 deletions(-)
  10. diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
  11. index c90821ecde179..79710a677bcfe 100644
  12. --- a/build/config/compiler/BUILD.gn
  13. +++ b/build/config/compiler/BUILD.gn
  14. @@ -345,7 +345,6 @@ config("compiler") {
  15. }
  16. if (use_lld) {
  17. - ldflags += [ "-fuse-ld=lld" ]
  18. if (lld_path != "") {
  19. ldflags += [ "-B$lld_path" ]
  20. }
  21. @@ -478,10 +477,6 @@ config("compiler") {
  22. #}
  23. }
  24. - if (use_icf && (!is_apple || use_lld)) {
  25. - ldflags += [ "-Wl,--icf=all" ]
  26. - }
  27. -
  28. if (is_linux || is_chromeos) {
  29. cflags += [ "-pthread" ]
  30. # Do not use the -pthread ldflag here since it becomes a no-op
  31. @@ -492,8 +487,6 @@ config("compiler") {
  32. # Clang-specific compiler flags setup.
  33. # ------------------------------------
  34. if (is_clang) {
  35. - cflags += [ "-fcolor-diagnostics" ]
  36. -
  37. # Enable -fmerge-all-constants. This used to be the default in clang
  38. # for over a decade. It makes clang non-conforming, but is fairly safe
  39. # in practice and saves some binary size. We might want to consider
  40. @@ -511,8 +504,6 @@ config("compiler") {
  41. # On Windows, we call the linker directly, instead of calling it through
  42. # the driver.
  43. ldflags += [ "--color-diagnostics" ]
  44. - } else {
  45. - ldflags += [ "-Wl,--color-diagnostics" ]
  46. }
  47. }
  48. @@ -749,10 +740,6 @@ config("compiler") {
  49. if (use_lld && !enable_call_graph_profile_sort) {
  50. if (is_win) {
  51. ldflags += [ "/call-graph-profile-sort:no" ]
  52. - } else if (!is_apple) {
  53. - # TODO(thakis): Once LLD's Mach-O port basically works, implement call
  54. - # graph profile sorting for it, add an opt-out flag, and pass it here.
  55. - ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
  56. }
  57. }
  58. --
  59. 2.25.1