naiveproxy/chrome/tools/build/win/syzygy/BUILD.gn

76 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2018-02-02 13:49:39 +03:00
# Copyright 2015 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/chrome_build.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/win/syzygy/syzygy.gni")
# Where the output binaries will be placed.
syzygy_dest_dir = "$root_out_dir/syzygy"
if (is_syzyasan) {
syzygy_asan("chrome_dll_syzygy") {
binary_name = "chrome.dll"
dest_dir = syzygy_dest_dir
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.
#
# For official builds, the instrumented version will be put into an
# "instrumented" subdirectory and the regular output will be
# uninstrumented. Otherwise, chrome_child is also instrumented to the
# normal place.
syzygy_asan("chrome_child_dll_syzygy") {
binary_name = "chrome_child.dll"
deps = [
"//chrome:chrome_child",
]
if (is_official_build) {
dest_dir = "$syzygy_dest_dir/instrumented"
deps += [ ":chrome_child_dll_syzygy_copy" ]
} else {
dest_dir = syzygy_dest_dir
}
}
if (is_official_build) {
# Copies the uninstrumented chrome_child.dll.
copy("chrome_child_dll_syzygy_copy") {
sources = [
"$root_out_dir/chrome_child.dll",
]
outputs = [
"$syzygy_dest_dir/{{source_file_part}}",
]
deps = [
"//chrome:chrome_child",
]
}
}
}
} else {
# No syzygy. Generate dummy targets so other targets can unconditionally
# depend on these without having to duplicate our conditions.
group("chrome_dll_syzygy") {
}
if (is_multi_dll_chrome) {
group("chrome_child_dll_syzygy") {
}
}
}
# Prevent unused variable warning for code paths where this is unused.
assert(syzygy_dest_dir != "")