| 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/chromecast_build.gni") | 5 import("//build/config/chromecast_build.gni") |
| 6 import("//testing/libfuzzer/fuzzer_test.gni") | 6 import("//testing/libfuzzer/fuzzer_test.gni") |
| 7 | 7 |
| 8 # On Linux, we implicitly already depend on expat via fontconfig; | 8 # On Linux, we implicitly already depend on expat via fontconfig; |
| 9 # let's not pull it in twice. | 9 # let's not pull it in twice. |
| 10 # Chromecast doesn't ship expat as a system library. | 10 # Chromecast doesn't ship expat as a system library. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 static_library("expat") { | 26 static_library("expat") { |
| 27 sources = [ | 27 sources = [ |
| 28 "files/lib/expat.h", | 28 "files/lib/expat.h", |
| 29 "files/lib/xmlparse.c", | 29 "files/lib/xmlparse.c", |
| 30 "files/lib/xmlrole.c", | 30 "files/lib/xmlrole.c", |
| 31 "files/lib/xmltok.c", | 31 "files/lib/xmltok.c", |
| 32 ] | 32 ] |
| 33 | 33 |
| 34 public_configs = [ ":expat_config" ] | 34 public_configs = [ ":expat_config" ] |
| 35 | 35 |
| 36 # TODO(thakis): Remove this once clang no longer crashes when building | |
| 37 # libexpat with -Oz. | |
| 38 configs -= [ "//build/config/compiler:default_optimization" ] | |
| 39 configs += [ "//build/config/compiler:optimize_max" ] | |
| 40 | |
| 41 defines = [ "_LIB" ] | 36 defines = [ "_LIB" ] |
| 42 if (is_win) { | 37 if (is_win) { |
| 43 defines += [ "COMPILED_FROM_DSP" ] | 38 defines += [ "COMPILED_FROM_DSP" ] |
| 44 } else { | 39 } else { |
| 45 defines += [ "HAVE_EXPAT_CONFIG_H" ] | 40 defines += [ "HAVE_EXPAT_CONFIG_H" ] |
| 46 } | 41 } |
| 47 } | 42 } |
| 48 } | 43 } |
| 49 | 44 |
| 50 fuzzer_test("expat_xml_parse_fuzzer") { | 45 fuzzer_test("expat_xml_parse_fuzzer") { |
| 51 sources = [ | 46 sources = [ |
| 52 "fuzz/expat_xml_parse_fuzzer.cc", | 47 "fuzz/expat_xml_parse_fuzzer.cc", |
| 53 ] | 48 ] |
| 54 deps = [ | 49 deps = [ |
| 55 ":expat", | 50 ":expat", |
| 56 ] | 51 ] |
| 57 dict = "//testing/libfuzzer/fuzzers/dicts/xml.dict" | 52 dict = "//testing/libfuzzer/fuzzers/dicts/xml.dict" |
| 58 } | 53 } |
| OLD | NEW |