Sophie

Sophie

distrib > Mageia > 8 > i586 > by-pkgid > 449fc9b6546474a81569af1274dce0b5 > files > 23

chromium-browser-stable-99.0.4844.51-1.mga8.src.rpm

--- patch98/build/config/compiler/BUILD.gn	2022-01-20 02:33:20.000000000 +0100
+++ patch98/build/config/compiler/BUILD.gn.clang	2022-01-27 22:21:44.954117389 +0100
@@ -528,37 +528,6 @@ config("compiler") {
     }
   }
 
-  # Enable text section splitting only on linux when using lld for now. Other
-  # platforms can be added later if needed.
-  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
-    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
-  }
-
-  if (is_clang && !is_nacl && current_os != "zos") {
-    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
-
-    # TODO(hans): Remove this once Clang generates better optimized debug info
-    # by default. https://crbug.com/765793
-    cflags += [
-      "-mllvm",
-      "-instcombine-lower-dbg-declare=0",
-    ]
-    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
-      if (is_win) {
-        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
-      } else {
-        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
-      }
-    }
-
-    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
-    if (is_win) {
-      cflags += [ "/clang:-ffp-contract=off" ]
-    } else {
-      cflags += [ "-ffp-contract=off" ]
-    }
-  }
-
   # C11/C++11 compiler flags setup.
   # ---------------------------
   if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
@@ -1231,45 +1200,6 @@ config("compiler_deterministic") {
     }
   }
 
-  # Makes builds independent of absolute file path.
-  if (is_clang && strip_absolute_paths_from_debug_symbols) {
-    # If debug option is given, clang includes $cwd in debug info by default.
-    # For such build, this flag generates reproducible obj files even we use
-    # different build directory like "out/feature_a" and "out/feature_b" if
-    # we build same files with same compile flag.
-    # Other paths are already given in relative, no need to normalize them.
-    if (is_nacl) {
-      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
-      cflags += [
-        "-Xclang",
-        "-fdebug-compilation-dir",
-        "-Xclang",
-        ".",
-      ]
-    } else {
-      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
-      # and -fcoverage-compilation-dir=.
-      cflags += [ "-ffile-compilation-dir=." ]
-    }
-    if (!is_win) {
-      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
-      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
-    }
-
-    if (is_win && use_lld) {
-      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
-        # Absolutize source file paths for PDB. Pass the real build directory
-        # if the pdb contains source-level debug information and if linker
-        # reproducibility is not critical.
-        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
-      } else {
-        # Use a fake fixed base directory for paths in the pdb to make the pdb
-        # output fully deterministic and independent of the build directory.
-        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
-      }
-    }
-  }
-
   # Tells the compiler not to use absolute paths when passing the default
   # paths to the tools it invokes. We don't want this because we don't
   # really need it and it can mess up the goma cache entries.
@@ -1556,7 +1486,7 @@ config("chromium_code") {
       defines = [ "_HAS_NODISCARD" ]
     }
   } else {
-    cflags = [ "-Wall" ]
+    cflags = []
     if (treat_warnings_as_errors) {
       cflags += [ "-Werror" ]
 
@@ -1565,10 +1495,6 @@ config("chromium_code") {
       # well.
       ldflags = [ "-Werror" ]
     }
-    if (is_clang) {
-      # Enable extra warnings for chromium_code when we control the compiler.
-      cflags += [ "-Wextra" ]
-    }
 
     # In Chromium code, we define __STDC_foo_MACROS in order to get the
     # C99 macros on Mac and Linux.