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

Unified Diff: build/win/syzygy/syzygy.gni

Issue 2126673002: Move the Syzygy scripts out of //chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the GYP files. Created 4 years, 5 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
« no previous file with comments | « build/win/syzygy/syzyasan-instrumentation-filter.txt ('k') | chrome/chrome_syzygy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/win/syzygy/syzygy.gni
diff --git a/build/win/syzygy/syzygy.gni b/build/win/syzygy/syzygy.gni
new file mode 100644
index 0000000000000000000000000000000000000000..1ae2ebef828b4708de29460773c02aa798abe3b3
--- /dev/null
+++ b/build/win/syzygy/syzygy.gni
@@ -0,0 +1,137 @@
+# 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.
+
+assert(is_win)
+
+# Where the output binaries will be placed.
+syzygy_dest_dir = "$root_out_dir/syzygy"
+
+# Generates a Syzygy optimize target.
+#
+# 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
+# generated by a dependency of this target.
+#
+# deps (required)
+# Normal meaning.
+#
+# data_deps
+# Normal meaning.
+template("syzygy_optimize") {
+ action(target_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ script = "//build/win/syzygy/reorder.py"
+
+ binary_name = invoker.binary_name
+ input_dll = "$root_out_dir/$binary_name"
+ input_pdb = "$root_out_dir/$binary_name.pdb"
+
+ inputs = [
+ input_dll,
+ #input_pdb,
+ ]
+
+ outputs = [
+ "$syzygy_dest_dir/$binary_name",
+ "$syzygy_dest_dir/$binary_name.pdb",
+ ]
+
+ args = [
+ "--input_executable",
+ rebase_path(input_dll, root_build_dir),
+ "--input_symbol",
+ rebase_path(input_pdb, root_build_dir),
+ "--destination_dir",
+ rebase_path(syzygy_dest_dir, root_build_dir),
+ ]
+
+ forward_variables_from(invoker,
+ [
+ "deps",
+ "data_deps",
+ "public_deps",
+ ])
+ }
+}
+
+# Instruments a binary with SyzyAsan.
+#
+# 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
+# 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)) {
+ visibility = invoker.visibility
+ }
+ script = "//build/win/syzygy/instrument.py"
+
+ filter = "//build/win/syzygy/syzyasan-instrumentation-filter.txt"
+
+ 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_image,
+
+ #input_pdb,
+ ]
+
+ output_filter = "$dest_dir/win-syzyasan-filter-$binary_name.txt.json"
+
+ outputs = [
+ "$dest_dir/$binary_name",
+ "$dest_dir/$binary_name.pdb",
+ output_filter,
+ ]
+
+ args = [
+ "--mode",
+ "asan",
+ "--input_executable",
+ rebase_path(input_image, root_build_dir),
+ "--input_symbol",
+ rebase_path(input_pdb, root_build_dir),
+ "--filter",
+ rebase_path(filter, root_build_dir),
+ "--output-filter-file",
+ rebase_path(output_filter, root_build_dir),
+ "--destination_dir",
+ rebase_path(dest_dir, root_build_dir),
+ ]
+
+ deps = [
+ "//build/win/syzygy:copy_syzyasan_binaries",
+ ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ forward_variables_from(invoker,
+ [
+ "data_deps",
+ "public_deps",
+ "testonly",
+ ])
+ }
+}
« no previous file with comments | « build/win/syzygy/syzyasan-instrumentation-filter.txt ('k') | chrome/chrome_syzygy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698