OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 config("lzma_sdk_config") { | 5 config("lzma_sdk_config") { |
6 include_dirs = [ "." ] | 6 include_dirs = [ "." ] |
7 } | 7 } |
8 | 8 |
| 9 # Must be in a config because of how GN orders flags (otherwise -Wall will |
| 10 # appear after this, and turn it back on). |
| 11 config("clang_warnings") { |
| 12 if (is_clang) { |
| 13 # Upstream uses self-assignment to avoid warnings. |
| 14 cflags = [ "-Wno-self-assign" ] |
| 15 } |
| 16 } |
| 17 |
9 static_library("lzma_sdk") { | 18 static_library("lzma_sdk") { |
10 sources = [ | 19 sources = [ |
11 "7z.h", | 20 "7z.h", |
12 "7zAlloc.c", | 21 "7zAlloc.c", |
13 "7zAlloc.h", | 22 "7zAlloc.h", |
14 "7zBuf.c", | 23 "7zBuf.c", |
15 "7zBuf.h", | 24 "7zBuf.h", |
16 "7zCrc.c", | 25 "7zCrc.c", |
17 "7zCrc.h", | 26 "7zCrc.h", |
18 "7zCrcOpt.c", | 27 "7zCrcOpt.c", |
(...skipping 24 matching lines...) Expand all Loading... |
43 "LzmaLib.h", | 52 "LzmaLib.h", |
44 "Types.h", | 53 "Types.h", |
45 ] | 54 ] |
46 | 55 |
47 defines = [ | 56 defines = [ |
48 "_7ZIP_ST", | 57 "_7ZIP_ST", |
49 "_LZMA_PROB32", | 58 "_LZMA_PROB32", |
50 ] | 59 ] |
51 | 60 |
52 configs -= [ "//build/config/compiler:chromium_code" ] | 61 configs -= [ "//build/config/compiler:chromium_code" ] |
53 configs += [ "//build/config/compiler:no_chromium_code" ] | 62 configs += [ |
54 | 63 ":clang_warnings", |
| 64 "//build/config/compiler:no_chromium_code", |
| 65 ] |
55 public_configs = [ ":lzma_sdk_config" ] | 66 public_configs = [ ":lzma_sdk_config" ] |
56 | |
57 # Must be in a config because of how GN orders flags (otherwise -Wall will | |
58 # appear after this, and turn it back on). | |
59 config("clang_warnings") { | |
60 if (is_clang) { | |
61 # Upstream uses self-assignment to avoid warnings. | |
62 cflags = [ "-Wno-self-assign" ] | |
63 } | |
64 } | |
65 configs += [ ":clang_warnings" ] | |
66 } | 67 } |
OLD | NEW |