| Index: chrome/utility/BUILD.gn
|
| diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
|
| index 46866bebe4604eb884915cbe6b1c1f900299c42f..34f1764864dae1e41c61df16b19be0e1fbbd2249 100644
|
| --- a/chrome/utility/BUILD.gn
|
| +++ b/chrome/utility/BUILD.gn
|
| @@ -5,6 +5,16 @@
|
| import("//build/config/crypto.gni")
|
| import("//build/config/features.gni")
|
| import("//build/config/sysroot.gni")
|
| +
|
| +# Provides a way for the utility library to push ldflags to dependents.
|
| +config("utility_ldflags") {
|
| + if (is_mac && safe_browsing_mode == 1) {
|
| + libs = [
|
| + "bz2",
|
| + "CoreFoundation.framework",
|
| + ]
|
| + }
|
| +}
|
|
|
| static_library("utility") {
|
| sources = [
|
| @@ -32,6 +42,7 @@
|
| "//build/config:precompiled_headers",
|
| "//build/config/compiler:wexit_time_destructors",
|
| ]
|
| + all_dependent_configs = [ ":utility_ldflags" ]
|
|
|
| public_deps = []
|
| deps = [
|
| @@ -171,7 +182,43 @@
|
| ]
|
| }
|
|
|
| - if (is_mac && safe_browsing_mode == 1) {
|
| - deps += [ "//chrome/utility/safe_browsing/mac" ]
|
| + if (safe_browsing_mode == 1) {
|
| + sources += [
|
| + "safe_browsing/mac/convert_big_endian.h",
|
| + "safe_browsing/mac/dmg_analyzer.cc",
|
| + "safe_browsing/mac/dmg_analyzer.h",
|
| + "safe_browsing/mac/dmg_iterator.cc",
|
| + "safe_browsing/mac/dmg_iterator.h",
|
| + "safe_browsing/mac/hfs.cc",
|
| + "safe_browsing/mac/hfs.h",
|
| + "safe_browsing/mac/read_stream.cc",
|
| + "safe_browsing/mac/read_stream.h",
|
| + "safe_browsing/mac/udif.cc",
|
| + "safe_browsing/mac/udif.h",
|
| + ]
|
| + deps += [ "//third_party/zlib" ]
|
| }
|
| }
|
| +
|
| +if (is_mac) {
|
| + import("//testing/libfuzzer/fuzzer_test.gni")
|
| + fuzzer_test("safe_browsing_dmg_fuzzer") {
|
| + sources = [
|
| + "safe_browsing/mac/convert_big_endian.h",
|
| + "safe_browsing/mac/fuzzer.cc",
|
| + "safe_browsing/mac/hfs.cc",
|
| + "safe_browsing/mac/hfs.h",
|
| + "safe_browsing/mac/read_stream.cc",
|
| + "safe_browsing/mac/read_stream.h",
|
| + "safe_browsing/mac/udif.cc",
|
| + "safe_browsing/mac/udif.h",
|
| + ]
|
| +
|
| + additional_configs = [ ":utility_ldflags" ]
|
| +
|
| + deps = [
|
| + "//base",
|
| + "//third_party/zlib",
|
| + ]
|
| + }
|
| +}
|
|
|