summaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-build_config_compiler_BUILD.gn
blob: 82763f0cc24123354f3560dad3255145e62486c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
--- build/config/compiler/BUILD.gn.orig	2018-01-04 21:05:38.000000000 +0100
+++ build/config/compiler/BUILD.gn	2018-01-20 16:53:24.701867000 +0100
@@ -47,7 +47,7 @@
   # only two architectures that are currently checked in). Turn this off when
   # you are using a custom toolchain and need to control -B in cflags.
   linux_use_bundled_binutils =
-      linux_use_bundled_binutils_override && is_linux &&
+      linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
       (current_cpu == "x64" || current_cpu == "x86")
   binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
                               root_build_dir)
@@ -222,7 +222,7 @@
     # Linker warnings.
     if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
         !(is_android && use_order_profiling) && !is_mac && !is_ios &&
-        current_os != "aix") {
+        current_os != "aix" && !is_bsd) {
       # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
       # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
       # crbug.com/485542
@@ -326,8 +326,6 @@
       "-Wl,-z,relro",
     ]
     if (!using_sanitizer) {
-      ldflags += [ "-Wl,-z,defs" ]
-
       # Functions interposed by the sanitizers can make ld think
       # that some libraries aren't needed when they actually are,
       # http://crbug.com/234010. As workaround, disable --as-needed.
@@ -424,7 +422,7 @@
   # TODO(hans): Remove this once Clang generates better optimized debug info by
   # default. https://crbug.com/765793
   if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
-      target_os != "chromeos") {
+      target_os != "chromeos" && !is_bsd) {
     cflags += [
       "-Xclang",
       "-mllvm",
@@ -638,7 +636,7 @@
         cflags += [ "-mtune=$arm_tune" ]
       }
     } else if (current_cpu == "arm64") {
-      if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
         cflags += [ "--target=aarch64-linux-gnu" ]
         ldflags += [ "--target=aarch64-linux-gnu" ]
       }
@@ -1261,23 +1259,8 @@
         # TODO(hans): https://crbug.com/637306
         "-Wno-address-of-packed-member",
 
-        # TODO(hans): https://crbug.com/681136
-        "-Wno-unused-lambda-capture",
-
         # TODO(thakis ): https://crbug.com/683349
         "-Wno-user-defined-warnings",
-
-        # TODO(thakis): https://crbug.com/753973
-        "-Wno-enum-compare-switch",
-
-        # TODO(hans): https://crbug.com/763392
-        "-Wno-tautological-unsigned-zero-compare",
-
-        # TODO(hans): https://crbug.com/766891
-        "-Wno-null-pointer-arithmetic",
-
-        # TODO(hans): https://crbug.com/767059
-        "-Wno-tautological-unsigned-enum-zero-compare",
       ]
     } else if (use_xcode_clang && xcode_version_int >= 830) {
       # This is necessary to allow a progressive transition from using xcode 8.0
@@ -1861,7 +1844,7 @@
         # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
         cflags += [ "-gdwarf-3" ]
       }
-      cflags += [ "-g2" ]
+      cflags += [ "-g0" ]
     }
     if (use_debug_fission && !is_nacl) {
       cflags += [ "-gsplit-dwarf" ]
@@ -1875,7 +1858,7 @@
     # DWARF info may be corrupt; offsets in a range list entry are in different
     # sections" there.  Maybe just a bug in nacl_switch_32.S.
     if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
-        (use_gold || use_lld)) {
+        (use_gold || use_lld) && !is_bsd) {
       if (is_clang) {
         # This flag enables the GNU-format pubnames and pubtypes sections,
         # which lld needs in order to generate a correct GDB index.