| 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 | 9 |
| 10 # compiler --------------------------------------------------------------------- | 10 # compiler --------------------------------------------------------------------- |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 "-Wno-missing-field-initializers", # "struct foo f = {0};" | 510 "-Wno-missing-field-initializers", # "struct foo f = {0};" |
| 511 "-Wno-unused-parameter", # Unused function parameters. | 511 "-Wno-unused-parameter", # Unused function parameters. |
| 512 ] | 512 ] |
| 513 | 513 |
| 514 if (is_mac) { | 514 if (is_mac) { |
| 515 cflags += [ | 515 cflags += [ |
| 516 "-Wnewline-eof", | 516 "-Wnewline-eof", |
| 517 ] | 517 ] |
| 518 } | 518 } |
| 519 | 519 |
| 520 # TODO(brettw) Ones below here should be clang-only when we have a flag | |
| 521 # for it. | |
| 522 if (is_clang) { | 520 if (is_clang) { |
| 523 cflags += [ | 521 cflags += [ |
| 524 "-Wheader-hygiene", | |
| 525 | |
| 526 # This warns on using ints as initializers for floats in | 522 # This warns on using ints as initializers for floats in |
| 527 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), | 523 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 528 # which happens in several places in chrome code. Not sure if | 524 # which happens in several places in chrome code. Not sure if |
| 529 # this is worth fixing. | 525 # this is worth fixing. |
| 530 "-Wno-c++11-narrowing", | 526 "-Wno-c++11-narrowing", |
| 531 | 527 |
| 532 # Don't die on dtoa code that uses a char as an array index. | 528 # Don't die on dtoa code that uses a char as an array index. |
| 533 # This is required solely for base/third_party/dmg_fp/dtoa.cc. | 529 # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 534 # TODO(brettw) move this to that project then! | 530 # TODO(brettw) move this to that project then! |
| 535 "-Wno-char-subscripts", | 531 "-Wno-char-subscripts", |
| 536 | 532 |
| 537 # Warns on switches on enums that cover all enum values but | 533 # Warns on switches on enums that cover all enum values but |
| 538 # also contain a default: branch. Chrome is full of that. | 534 # also contain a default: branch. Chrome is full of that. |
| 539 "-Wno-covered-switch-default", | 535 "-Wno-covered-switch-default", |
| 540 | 536 |
| 541 # Clang considers the `register` keyword as deprecated, but e.g. | 537 # Clang considers the `register` keyword as deprecated, but e.g. |
| 542 # code generated by flex (used in angle) contains that keyword. | 538 # code generated by flex (used in angle) contains that keyword. |
| 543 # http://crbug.com/255186 | 539 # http://crbug.com/255186 |
| 544 "-Wno-deprecated-register", | 540 "-Wno-deprecated-register", |
| 545 | 541 |
| 546 # Clang spots more unused functions. | 542 # Clang spots more unused functions. |
| 547 "-Wno-unused-function", | 543 "-Wno-unused-function", |
| 548 | |
| 549 # Warns when a const char[] is converted to bool. | |
| 550 "-Wstring-conversion", | |
| 551 ] | 544 ] |
| 552 } | 545 } |
| 553 | 546 |
| 554 if (is_android) { | 547 if (is_android) { |
| 555 # Disable any additional warnings enabled by the Android build system but | 548 # Disable any additional warnings enabled by the Android build system but |
| 556 # which chromium does not build cleanly with (when treating warning as | 549 # which chromium does not build cleanly with (when treating warning as |
| 557 # errors). | 550 # errors). |
| 558 cflags += [ | 551 cflags += [ |
| 559 "-Wno-extra", | 552 "-Wno-extra", |
| 560 "-Wno-ignored-qualifiers", | 553 "-Wno-ignored-qualifiers", |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 cflags = [ "-g1" ] | 666 cflags = [ "-g1" ] |
| 674 } | 667 } |
| 675 } | 668 } |
| 676 | 669 |
| 677 config("no_symbols") { | 670 config("no_symbols") { |
| 678 if (!is_win) { | 671 if (!is_win) { |
| 679 cflags = [ "-g0" ] | 672 cflags = [ "-g0" ] |
| 680 } | 673 } |
| 681 } | 674 } |
| 682 | 675 |
| OLD | NEW |