Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2076)

Unified Diff: chrome/tools/build/win/syzygy/BUILD.gn

Issue 2085813004: Add the mini_installer_syzygy GN target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: x86 only. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/tools/build/win/syzygy/BUILD.gn
diff --git a/chrome/tools/build/win/syzygy/BUILD.gn b/chrome/tools/build/win/syzygy/BUILD.gn
index c73f94944a65b72f6a4b5d4eb021110f841c0cec..6243dab30f400d69bb270c12c24592914e7bac04 100644
--- a/chrome/tools/build/win/syzygy/BUILD.gn
+++ b/chrome/tools/build/win/syzygy/BUILD.gn
@@ -29,6 +29,9 @@ if (syzygy_optimize) {
#
# deps (required)
# Normal meaning.
+ #
+ # data_deps
+ # Normal meaning.
template("syzygy_optimize") {
action(target_name) {
if (defined(invoker.visibility)) {
@@ -62,6 +65,10 @@ if (syzygy_optimize) {
if (defined(invoker.deps)) {
brettw 2016/06/24 23:51:43 You can replace both of these defined checks with:
Dirk Pranke 2016/06/25 22:53:57 Acknowledged.
deps = invoker.deps
}
+
+ if (defined(invoker.data_deps)) {
+ data_deps = invoker.data_deps
+ }
}
}
@@ -70,6 +77,11 @@ if (syzygy_optimize) {
deps = [
"//chrome:main_dll",
]
+ if (is_multi_dll_chrome) {
+ data_deps = [
+ ":chrome_child_dll_syzygy",
+ ]
+ }
}
if (is_multi_dll_chrome) {
# Also instrument chrome_child.dll.
@@ -83,13 +95,23 @@ if (syzygy_optimize) {
} else if (is_syzyasan) {
# Instruments a binary with SyzyAsan.
#
- # dll_name (required)
- # Name of the DLL to be instrumented, with no extension or path. This
- # ${dll_name}.dll is assumed to be in the output directory and must be
+ # binary_name (required)
+ # Name of the binary to be instrumented, with no extension or path. This
+ # ${binary_name} is assumed to be in the output directory and must be
brettw 2016/06/24 23:51:43 Just delete the $ and {} on this now (before it wa
Dirk Pranke 2016/06/25 22:53:57 Acknowledged.
# generated by a dependency of this target.
#
+ # dest_dir (required)
+ # The destination directory where the instrumented image should be
+ # written.
+ #
# deps (required)
# Normal meaning.
+ #
+ # public_deps
+ # Normal meaning.
+ #
+ # data_deps
+ # Normal meaning.
template("syzygy_asan") {
action(target_name) {
if (defined(invoker.visibility)) {
@@ -99,22 +121,23 @@ if (syzygy_optimize) {
filter = "syzyasan-instrumentation-filter.txt"
- dll_name = invoker.dll_name
- input_dll = "$root_out_dir/$dll_name.dll"
- input_pdb = "$root_out_dir/$dll_name.dll.pdb"
+ binary_name = invoker.binary_name
+ dest_dir = invoker.dest_dir
+ input_image = "$root_out_dir/$binary_name"
+ input_pdb = "$root_out_dir/$binary_name.pdb"
inputs = [
filter,
- input_dll,
+ input_image,
#input_pdb,
]
- output_filter = "$syzygy_dest_dir/win-syzyasan-filter-$dll_name.txt.json"
+ output_filter = "$dest_dir/win-syzyasan-filter-$binary_name.txt.json"
outputs = [
- "$syzygy_dest_dir/$dll_name.dll",
- "$syzygy_dest_dir/$dll_name.dll.pdb",
+ "$dest_dir/$input_image",
+ "$dest_dir/$input_image.pdb",
output_filter,
]
@@ -122,7 +145,7 @@ if (syzygy_optimize) {
"--mode",
"asan",
"--input_executable",
- rebase_path(input_dll, root_build_dir),
+ rebase_path(input_image, root_build_dir),
"--input_symbol",
rebase_path(input_pdb, root_build_dir),
"--filter",
@@ -130,7 +153,7 @@ if (syzygy_optimize) {
"--output-filter-file",
rebase_path(output_filter, root_build_dir),
"--destination_dir",
- rebase_path(syzygy_dest_dir, root_build_dir),
+ rebase_path(dest_dir, root_build_dir),
]
deps = [
@@ -142,11 +165,15 @@ if (syzygy_optimize) {
if (defined(invoker.public_deps)) {
public_deps = invoker.public_deps
}
+ if (defined(invoker.data_deps)) {
+ data_deps = invoker.data_deps
+ }
}
}
syzygy_asan("chrome_dll_syzygy") {
- dll_name = "chrome"
+ binary_name = "chrome.dll"
+ dest_dir = syzygy_dest_dir
deps = [
"//chrome:main_dll",
]
@@ -160,7 +187,7 @@ if (syzygy_optimize) {
# uninstrumented. Otherwise, chrome_child is also instrumented to the
# normal place.
syzygy_asan("chrome_child_dll_syzygy") {
- dll_name = "chrome_child"
+ binary_name = "chrome_child.dll"
deps = [
"//chrome:chrome_child",
]
@@ -171,23 +198,26 @@ if (syzygy_optimize) {
} else {
dest_dir = syzygy_dest_dir
}
- }
- if (is_official_build) {
- # Copies the uninstrumented chrome_child.dll.
- # GYP version: chrome/chrome_syzygy.gyp:chrome_child_dll_syzygy_copy
- copy("chrome_child_dll_syzygy_copy") {
- sources = [
- "$root_out_dir/chrome_child.dll",
- "$root_out_dir/chrome_child.dll.pdb",
- ]
- outputs = [
- "$syzygy_dest_dir/{{source_file_part}}",
- ]
- deps = [
- "//chrome:chrome_child",
- ]
+ if (is_official_build) {
+ # Copies the uninstrumented chrome_child.dll.
+ # GYP version: chrome/chrome_syzygy.gyp:chrome_child_dll_syzygy_copy
+ copy("chrome_child_dll_syzygy_copy") {
brettw 2016/06/24 23:51:43 The copy target is defined inside the syzygy_asan
Dirk Pranke 2016/06/25 22:53:57 s/bested/nested :). Ack.
+ sources = [
+ "$root_out_dir/chrome_child.dll",
+ "$root_out_dir/chrome_child.dll.pdb",
+ ]
+ outputs = [
+ "$dest_dir/{{source_file_part}}",
+ ]
+ deps = [
+ "//chrome:chrome_child",
+ ]
+ }
}
+ data_deps = [
+ ":chrome_child_dll_syzygy",
+ ]
}
}
} else {

Powered by Google App Engine
This is Rietveld 408576698