GN configs for ipc fuzzer.
Also removes an unneeded dep from message_lib.gyp. BUG=605926 Review URL: https://codereview.chromium.org/1916493003 Cr-Commit-Position: refs/heads/master@{#389861}
This commit is contained in:
BUILD.gn
chrome
content/child
docs
ipc
tools/ipc_fuzzer
1
BUILD.gn
1
BUILD.gn
@ -103,6 +103,7 @@ group("both_gn_and_gyp") {
|
||||
"//skia:skia_unittests",
|
||||
"//sql:sql_unittests",
|
||||
"//sync:sync_unit_tests",
|
||||
"//tools/ipc_fuzzer:ipc_fuzzer_all",
|
||||
"//ui/base:ui_base_unittests",
|
||||
"//ui/gfx:gfx_unittests",
|
||||
"//url:url_unittests",
|
||||
|
@ -10,6 +10,7 @@ import("//chrome/common/features.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//third_party/kasko/kasko.gni")
|
||||
import("//third_party/protobuf/proto_library.gni")
|
||||
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
|
||||
|
||||
# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
|
||||
# produces a conflict for the "grit" template so we have to only include one.
|
||||
@ -970,6 +971,10 @@ source_set("browser") {
|
||||
"chrome_browser_main_extra_parts_exo.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_ipc_fuzzer) {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (android_java_ui) {
|
||||
|
@ -7,6 +7,7 @@ import("//chrome/common/features.gni")
|
||||
import("//chrome/version.gni")
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
|
||||
|
||||
gypi_values = exec_script("//build/gypi_to_gn.py",
|
||||
[ rebase_path("../chrome_common.gypi") ],
|
||||
@ -281,6 +282,14 @@ static_library("common") {
|
||||
".",
|
||||
"//chrome")
|
||||
}
|
||||
|
||||
if (enable_ipc_fuzzer) {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
|
||||
sources += [
|
||||
"external_ipc_dumper.cc",
|
||||
"external_ipc_dumper.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# GYP version: chrome/common_constants.gyp:version_header
|
||||
@ -349,6 +358,10 @@ static_library("constants") {
|
||||
# implemented in //ui/base, so we need that dependency.
|
||||
deps += [ "//ui/base" ]
|
||||
}
|
||||
|
||||
if (enable_ipc_fuzzer) {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import("//build/config/features.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
|
||||
|
||||
gypi_values = exec_script("//build/gypi_to_gn.py",
|
||||
[ rebase_path("../chrome_renderer.gypi") ],
|
||||
@ -181,6 +182,10 @@ static_library("renderer") {
|
||||
"spellchecker/hunspell_engine.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_ipc_fuzzer) {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
# In GYP this is part of test_support_common.
|
||||
|
@ -18,6 +18,7 @@ source_set("child") {
|
||||
"//content/public/child:child_sources",
|
||||
"//content/renderer/*",
|
||||
"//content/utility/*",
|
||||
"//tools/ipc_fuzzer/*",
|
||||
]
|
||||
|
||||
sources = rebase_path(content_child_gypi_values.private_child_sources,
|
||||
|
@ -13,7 +13,8 @@ contribute.
|
||||
|
||||
### Build instructions
|
||||
|
||||
* add `enable_ipc_fuzzer=1` to `GYP_DEFINES`
|
||||
* Run `gn args` and add `enable_ipc_fuzzer = true` to your args.gn. If you use
|
||||
GYP, add `enable_ipc_fuzzer=1` to `GYP_DEFINES`.
|
||||
* build `ipc_fuzzer_all` target
|
||||
* component builds are currently broken, sorry
|
||||
* Debug builds are broken; only Release mode works.
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import("//build/config/nacl/config.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
|
||||
|
||||
assert(!is_ios)
|
||||
|
||||
@ -141,6 +142,10 @@ component("ipc") {
|
||||
# On Mac MachPortAttachmentMac needs to generate random IDs.
|
||||
deps += [ "//crypto" ]
|
||||
}
|
||||
|
||||
if (enable_ipc_fuzzer) {
|
||||
public_configs = [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is provided as a separate target so other targets can provide param
|
||||
|
34
tools/ipc_fuzzer/BUILD.gn
Normal file
34
tools/ipc_fuzzer/BUILD.gn
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
|
||||
|
||||
config("ipc_fuzzer_config") {
|
||||
defines = [ "ENABLE_IPC_FUZZER" ]
|
||||
}
|
||||
|
||||
config("ipc_fuzzer_tool_config") {
|
||||
defines = [
|
||||
"ENABLE_IPC_FUZZER",
|
||||
"USE_CUPS",
|
||||
]
|
||||
include_dirs = [ "." ]
|
||||
}
|
||||
|
||||
if (enable_ipc_fuzzer && (is_linux || is_mac || is_win)) {
|
||||
assert(!is_component_build, "IPC fuzzer does not support component builds.")
|
||||
|
||||
group("ipc_fuzzer_all") {
|
||||
deps = [
|
||||
"//tools/ipc_fuzzer/fuzzer:ipc_fuzzer",
|
||||
"//tools/ipc_fuzzer/message_dump:ipc_message_dump",
|
||||
"//tools/ipc_fuzzer/message_replay:ipc_fuzzer_replay",
|
||||
"//tools/ipc_fuzzer/message_tools:ipc_message_list",
|
||||
"//tools/ipc_fuzzer/message_tools:ipc_message_util",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
group("ipc_fuzzer_all") {
|
||||
}
|
||||
}
|
28
tools/ipc_fuzzer/fuzzer/BUILD.gn
Normal file
28
tools/ipc_fuzzer/fuzzer/BUILD.gn
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
|
||||
executable("ipc_fuzzer") {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
|
||||
sources = [
|
||||
"fuzzer.cc",
|
||||
"fuzzer.h",
|
||||
"fuzzer_main.cc",
|
||||
"generator.cc",
|
||||
"generator.h",
|
||||
"mutator.cc",
|
||||
"mutator.h",
|
||||
"rand_util.cc",
|
||||
"rand_util.h",
|
||||
]
|
||||
deps = [
|
||||
"//tools/ipc_fuzzer/message_lib:ipc_message_lib",
|
||||
]
|
||||
if (is_asan && is_chromeos) {
|
||||
# Compiling fuzzer.cc with ASan takes too long, see
|
||||
# http://crbug.com/360158.
|
||||
config -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
|
||||
}
|
||||
}
|
8
tools/ipc_fuzzer/ipc_fuzzer.gni
Normal file
8
tools/ipc_fuzzer/ipc_fuzzer.gni
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
declare_args() {
|
||||
# Don't build IPC fuzzer by default.
|
||||
enable_ipc_fuzzer = false
|
||||
}
|
13
tools/ipc_fuzzer/message_dump/BUILD.gn
Normal file
13
tools/ipc_fuzzer/message_dump/BUILD.gn
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
loadable_module("ipc_message_dump") {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
|
||||
deps = [
|
||||
"//tools/ipc_fuzzer/message_lib:ipc_message_lib",
|
||||
]
|
||||
sources = [
|
||||
"message_dump.cc",
|
||||
]
|
||||
}
|
37
tools/ipc_fuzzer/message_lib/BUILD.gn
Normal file
37
tools/ipc_fuzzer/message_lib/BUILD.gn
Normal file
@ -0,0 +1,37 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
static_library("ipc_message_lib") {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
|
||||
public_deps = [
|
||||
"//base",
|
||||
"//chrome/common",
|
||||
"//chrome/common/safe_browsing:proto",
|
||||
"//components/content_settings/content/common",
|
||||
"//components/nacl/common",
|
||||
"//components/network_hints/common",
|
||||
"//components/pdf/common",
|
||||
"//content/child",
|
||||
"//content/public/child",
|
||||
"//ipc",
|
||||
"//media/cast:net",
|
||||
"//ppapi/proxy:ipc",
|
||||
"//skia",
|
||||
"//third_party/WebKit/public:blink",
|
||||
"//third_party/WebKit/public:blink_headers",
|
||||
"//third_party/libjingle",
|
||||
"//third_party/mt19937ar",
|
||||
"//ui/accessibility:ax_gen",
|
||||
]
|
||||
sources = [
|
||||
"all_messages.h",
|
||||
"message_cracker.h",
|
||||
"message_file.h",
|
||||
"message_file_format.h",
|
||||
"message_file_reader.cc",
|
||||
"message_file_writer.cc",
|
||||
"message_names.cc",
|
||||
"message_names.h",
|
||||
]
|
||||
}
|
@ -17,7 +17,6 @@
|
||||
'../../../ipc/ipc.gyp:ipc',
|
||||
'../../../media/cast/cast.gyp:cast_net',
|
||||
'../../../ppapi/ppapi_internal.gyp:ppapi_ipc',
|
||||
'../../../remoting/remoting.gyp:remoting_host',
|
||||
'../../../skia/skia.gyp:skia',
|
||||
'../../../third_party/libjingle/libjingle.gyp:libjingle',
|
||||
'../../../third_party/mt19937ar/mt19937ar.gyp:mt19937ar',
|
||||
|
16
tools/ipc_fuzzer/message_replay/BUILD.gn
Normal file
16
tools/ipc_fuzzer/message_replay/BUILD.gn
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
executable("ipc_fuzzer_replay") {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
|
||||
deps = [
|
||||
"//ipc/mojo",
|
||||
"//tools/ipc_fuzzer/message_lib:ipc_message_lib",
|
||||
]
|
||||
sources = [
|
||||
"replay.cc",
|
||||
"replay_process.cc",
|
||||
"replay_process.h",
|
||||
]
|
||||
}
|
25
tools/ipc_fuzzer/message_tools/BUILD.gn
Normal file
25
tools/ipc_fuzzer/message_tools/BUILD.gn
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
executable("ipc_message_util") {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
|
||||
deps = [
|
||||
"//third_party/re2",
|
||||
"//tools/ipc_fuzzer/message_lib:ipc_message_lib",
|
||||
]
|
||||
sources = [
|
||||
"message_util.cc",
|
||||
]
|
||||
}
|
||||
|
||||
executable("ipc_message_list") {
|
||||
configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_tool_config" ]
|
||||
deps = [
|
||||
"//chrome/common/safe_browsing:proto",
|
||||
"//tools/ipc_fuzzer/message_lib:ipc_message_lib",
|
||||
]
|
||||
sources = [
|
||||
"message_list.cc",
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user