Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1510)

Unified Diff: build/config/compiler/BUILD.gn

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/clang/BUILD.gn ('k') | build/config/features.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 5cf0331c87d64bb16123d72e0993db9c448424b1..43971510dbe6341bafce5e079ec4291571dcffa0 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -48,6 +48,13 @@ declare_args() {
# http://gcc.gnu.org/wiki/DebugFission
use_debug_fission =
!is_win && use_gold && linux_use_bundled_binutils && !use_ccache
+
+ if (is_win) {
+ # Whether the VS xtree header has been patched to disable warning 4702. If
+ # it has, then we don't need to disable 4702 (unreachable code warning).
+ # The patch is preapplied to the internal toolchain and hence all bots.
+ msvs_xtree_patched = false
+ }
}
# default_include_dirs ---------------------------------------------------------
@@ -295,12 +302,23 @@ config("compiler") {
"-mips32r2",
"-Wa,-mips32r2",
]
+ if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+ cflags += [ "-m$mips_fpu_mode" ]
+ }
} else if (mips_arch_variant == "r1") {
cflags += [
"-mips32",
"-Wa,-mips32",
]
}
+
+ if (mips_dsp_rev == 1) {
+ cflags += [ "-mdsp" ]
+ } else if (mips_dsp_rev == 2) {
+ cflags += [ "-mdspr2" ]
+ }
+
+ cflags += [ "-m${mips_float_abi}-float" ]
}
} else if (current_cpu == "mips64el") {
# Don't set the compiler flags for the WebView build. These will come
@@ -709,6 +727,7 @@ config("default_warnings") {
if (is_win) {
cflags = [
"/WX", # Treat warnings as errors.
+
# Warnings permanently disabled:
# TODO(GYP) The GYP build doesn't have this globally enabled but disabled
@@ -763,6 +782,7 @@ config("default_warnings") {
# have to turn off this warning (and be careful about how object
# destruction happens in such cases).
"/wd4611",
+
# Warnings to evaluate and possibly fix/reenable later:
"/wd4100", # Unreferenced formal function parameter.
@@ -775,6 +795,14 @@ config("default_warnings") {
"/wd4610", # Class can never be instantiated, constructor required.
"/wd4996", # Deprecated function warning.
]
+
+ # VS xtree header file needs to be patched or 4702 (unreachable code
+ # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is
+ # not patched.
+ if (!msvs_xtree_patched &&
+ exec_script("../../win_is_xtree_patched.py", [], "value") == 0) {
+ cflags += [ "/wd4702" ] # Unreachable code.
+ }
} else {
# Common GCC warning setup.
cflags = [
« no previous file with comments | « build/config/clang/BUILD.gn ('k') | build/config/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698