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("libxslt_config") { | 5 config("libxslt_config") { |
6 defines = [ "LIBXSLT_STATIC" ] | 6 defines = [ "LIBXSLT_STATIC" ] |
7 include_dirs = [ "." ] | 7 include_dirs = [ "." ] |
8 } | 8 } |
9 | 9 |
10 static_library("libxslt") { | 10 static_library("libxslt") { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 "libxslt/xsltlocale.c", | 52 "libxslt/xsltlocale.c", |
53 "libxslt/xsltlocale.h", | 53 "libxslt/xsltlocale.h", |
54 "libxslt/xsltutils.c", | 54 "libxslt/xsltutils.c", |
55 "libxslt/xsltutils.h", | 55 "libxslt/xsltutils.h", |
56 "libxslt/xsltwin32config.h", | 56 "libxslt/xsltwin32config.h", |
57 "linux/config.h", | 57 "linux/config.h", |
58 "mac/config.h", | 58 "mac/config.h", |
59 "win32/config.h", | 59 "win32/config.h", |
60 ] | 60 ] |
61 | 61 |
| 62 config("libxslt_warnings") { |
| 63 if (is_clang) { |
| 64 cflags = [ |
| 65 # libxslt stores a char[3] in a `const unsigned char*`. |
| 66 "-Wno-pointer-sign", |
| 67 |
| 68 # xsltDefaultRegion and xsltCalibrateTimestamps are only |
| 69 # used with certain preprocessor defines set. |
| 70 "-Wno-unused-function", |
| 71 ] |
| 72 } |
| 73 } |
62 configs -= [ "//build/config/compiler:chromium_code" ] | 74 configs -= [ "//build/config/compiler:chromium_code" ] |
63 configs += [ "//build/config/compiler:no_chromium_code" ] | 75 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 76 configs += [ ":libxslt_warnings" ] |
64 public_configs = [ ":libxslt_config" ] | 77 public_configs = [ ":libxslt_config" ] |
65 | 78 |
66 cflags = [] | 79 cflags = [] |
67 if (is_linux || is_android) { | 80 if (is_linux || is_android) { |
68 include_dirs = [ "linux" ] | 81 include_dirs = [ "linux" ] |
69 } else if (is_win) { | 82 } else if (is_win) { |
70 include_dirs = [ "win32" ] | 83 include_dirs = [ "win32" ] |
71 cflags += [ "/wd4267" ] # size_t to int. | 84 cflags += [ "/wd4267" ] # size_t to int. |
72 } else if (is_mac) { | 85 } else if (is_mac) { |
73 include_dirs = [ "mac" ] | 86 include_dirs = [ "mac" ] |
74 } | 87 } |
75 | 88 |
76 if (is_clang) { | |
77 cflags += [ "-Wno-pointer-sign" ] | |
78 } | |
79 | |
80 deps = [ | 89 deps = [ |
81 "//third_party/libxml", | 90 "//third_party/libxml", |
82 ] | 91 ] |
83 } | 92 } |
OLD | NEW |