OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (is_posix) { | 9 if (is_posix) { |
10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 config("no_chromium_code") { | 554 config("no_chromium_code") { |
555 cflags = [] | 555 cflags = [] |
556 cflags_cc = [] | 556 cflags_cc = [] |
557 defines = [] | 557 defines = [] |
558 | 558 |
559 if (is_win) { | 559 if (is_win) { |
560 cflags += [ | 560 cflags += [ |
561 "/W3", # Warning level 3. | 561 "/W3", # Warning level 3. |
562 "/wd4800", # Disable warning when forcing value to bool. | 562 "/wd4800", # Disable warning when forcing value to bool. |
563 "/wd4267", # TODO(jschuh): size_t to int. | 563 "/wd4267", # TODO(jschuh): size_t to int. |
| 564 "/wd4996", # Deprecated function warning. |
564 ] | 565 ] |
565 defines += [ | 566 defines += [ |
566 "_CRT_NONSTDC_NO_WARNINGS", | 567 "_CRT_NONSTDC_NO_WARNINGS", |
567 "_CRT_NONSTDC_NO_DEPRECATE", | 568 "_CRT_NONSTDC_NO_DEPRECATE", |
568 ] | 569 ] |
569 } | 570 } |
570 | 571 |
571 if (is_linux) { | 572 if (is_linux) { |
572 # Don't warn about ignoring the return value from e.g. close(). This is | 573 # Don't warn about ignoring the return value from e.g. close(). This is |
573 # off by default in some gccs but on by default in others. BSD systems do | 574 # off by default in some gccs but on by default in others. BSD systems do |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 # Warnings to evaluate and possibly fix/reenable later: | 690 # Warnings to evaluate and possibly fix/reenable later: |
690 | 691 |
691 "/wd4100", # Unreferenced formal function parameter. | 692 "/wd4100", # Unreferenced formal function parameter. |
692 "/wd4189", # A variable was declared and initialized but never used. | 693 "/wd4189", # A variable was declared and initialized but never used. |
693 "/wd4244", # Conversion: possible loss of data. | 694 "/wd4244", # Conversion: possible loss of data. |
694 "/wd4481", # Nonstandard extension: override specifier. | 695 "/wd4481", # Nonstandard extension: override specifier. |
695 "/wd4505", # Unreferenced local function has been removed. | 696 "/wd4505", # Unreferenced local function has been removed. |
696 "/wd4510", # Default constructor could not be generated. | 697 "/wd4510", # Default constructor could not be generated. |
697 "/wd4512", # Assignment operator could not be generated. | 698 "/wd4512", # Assignment operator could not be generated. |
698 "/wd4610", # Class can never be instantiated, constructor required. | 699 "/wd4610", # Class can never be instantiated, constructor required. |
| 700 "/wd4996", # Deprecated function warning. |
699 ] | 701 ] |
700 } else { | 702 } else { |
701 # Common GCC warning setup. | 703 # Common GCC warning setup. |
702 cflags = [ | 704 cflags = [ |
703 # Enables. | 705 # Enables. |
704 "-Wendif-labels", # Weird old-style text after an #endif. | 706 "-Wendif-labels", # Weird old-style text after an #endif. |
705 "-Werror", # Warnings as errors. | 707 "-Werror", # Warnings as errors. |
706 | 708 |
707 # Disables. | 709 # Disables. |
708 "-Wno-missing-field-initializers", # "struct foo f = {0};" | 710 "-Wno-missing-field-initializers", # "struct foo f = {0};" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 cflags += [ "-gsplit-dwarf" ] | 970 cflags += [ "-gsplit-dwarf" ] |
969 } | 971 } |
970 } | 972 } |
971 } | 973 } |
972 | 974 |
973 config("no_symbols") { | 975 config("no_symbols") { |
974 if (!is_win) { | 976 if (!is_win) { |
975 cflags = [ "-g0" ] | 977 cflags = [ "-g0" ] |
976 } | 978 } |
977 } | 979 } |
OLD | NEW |