| Index: third_party/gflags/BUILD.gn
|
| diff --git a/third_party/gflags/BUILD.gn b/third_party/gflags/BUILD.gn
|
| index a2f1c3d4133b599d6f70ace4a79103c38c29a75a..b3201bb8438e9c0a7e57f97a41ccd29a86cf0791 100644
|
| --- a/third_party/gflags/BUILD.gn
|
| +++ b/third_party/gflags/BUILD.gn
|
| @@ -13,7 +13,7 @@ if (is_win) {
|
| }
|
|
|
| config("gflags_config") {
|
| - include_dirs = [
|
| + include_dirs = [
|
| "$gflags_gen_arch_root/include", # For configured files.
|
| "src", # For everything else.
|
| ]
|
| @@ -25,6 +25,13 @@ config("gflags_config") {
|
| "GFLAGS_DLL_DECLARE_FLAG=",
|
| "GFLAGS_DLL_DEFINE_FLAG=",
|
| ]
|
| +
|
| + # GN orders flags on a target before flags from configs. The default config
|
| + # adds -Wall, and this flag have to be after -Wall -- so they need to
|
| + # come from a config and can't be on the target directly.
|
| + if (is_clang) {
|
| + cflags = [ "-Wno-unused-local-typedef" ]
|
| + }
|
| }
|
|
|
| source_set("gflags") {
|
| @@ -33,18 +40,17 @@ source_set("gflags") {
|
| "src/gflags_completions.cc",
|
| "src/gflags_reporting.cc",
|
| ]
|
| + cflags = []
|
| if (is_win) {
|
| sources += [ "src/windows/port.cc" ]
|
|
|
| - cflags = [
|
| + cflags += [
|
| "/wd4005", # WIN32_LEAN_AND_MEAN.
|
| "/wd4267", # Conversion from size_t to "type".
|
| ]
|
| }
|
|
|
| - include_dirs = [
|
| - "$gflags_gen_arch_root/include/private", # For config.h
|
| - ]
|
| + include_dirs = [ "$gflags_gen_arch_root/include/private" ] # For config.h
|
|
|
| public_configs = [ ":gflags_config" ]
|
|
|
|
|