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 | |
18 static_library("lzma_sdk") { | 9 static_library("lzma_sdk") { |
19 sources = [ | 10 sources = [ |
20 "7z.h", | 11 "7z.h", |
21 "7zAlloc.c", | 12 "7zAlloc.c", |
22 "7zAlloc.h", | 13 "7zAlloc.h", |
23 "7zBuf.c", | 14 "7zBuf.c", |
24 "7zBuf.h", | 15 "7zBuf.h", |
25 "7zCrc.c", | 16 "7zCrc.c", |
26 "7zCrc.h", | 17 "7zCrc.h", |
27 "7zCrcOpt.c", | 18 "7zCrcOpt.c", |
(...skipping 24 matching lines...) Expand all Loading... |
52 "LzmaLib.h", | 43 "LzmaLib.h", |
53 "Types.h", | 44 "Types.h", |
54 ] | 45 ] |
55 | 46 |
56 defines = [ | 47 defines = [ |
57 "_7ZIP_ST", | 48 "_7ZIP_ST", |
58 "_LZMA_PROB32", | 49 "_LZMA_PROB32", |
59 ] | 50 ] |
60 | 51 |
61 configs -= [ "//build/config/compiler:chromium_code" ] | 52 configs -= [ "//build/config/compiler:chromium_code" ] |
62 configs += [ | 53 configs += [ "//build/config/compiler:no_chromium_code" ] |
63 ":clang_warnings", | 54 |
64 "//build/config/compiler:no_chromium_code", | |
65 ] | |
66 public_configs = [ ":lzma_sdk_config" ] | 55 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" ] |
67 } | 66 } |
OLD | NEW |