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

Unified Diff: chrome_elf/BUILD.gn

Issue 1841573002: [Chrome ELF] New NT registry API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PRESUBMIT to allow chrome_elf directory files to use wstring. 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 | « chrome/install_static/install_util_unittest.cc ('k') | chrome_elf/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_elf/BUILD.gn
diff --git a/chrome_elf/BUILD.gn b/chrome_elf/BUILD.gn
index a3ba1b4269f0da8b68f9819fd6f990c135427952..3f8d47d3d8070eb623a044296dad040863241256 100644
--- a/chrome_elf/BUILD.gn
+++ b/chrome_elf/BUILD.gn
@@ -1,11 +1,18 @@
# 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.
+# found in the LICENSE file.
+
+# Chrome elf targets (excepting tests) should only link in kernel32.
+# Please don't add dependencies on any other system libraries.
import("//build/config/win/manifest.gni")
import("//chrome/version.gni")
import("//testing/test.gni")
+##------------------------------------------------------------------------------
+## chrome_elf
+##------------------------------------------------------------------------------
+
process_version("chrome_elf_resources") {
template_file = chrome_version_rc_template
sources = [
@@ -38,10 +45,11 @@ shared_library("chrome_elf") {
":breakpad",
":chrome_elf_manifest",
":chrome_elf_resources",
- ":common",
+ ":hook_util",
"//base",
"//build/config/sanitizers:deps",
"//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
"//components/crash/content/app",
"//components/crash/core/common",
"//content/public/common:result_codes",
@@ -66,6 +74,10 @@ shared_library("chrome_elf") {
}
}
+##------------------------------------------------------------------------------
+## source sets
+##------------------------------------------------------------------------------
+
source_set("constants") {
sources = [
"chrome_elf_constants.cc",
@@ -73,35 +85,6 @@ source_set("constants") {
]
}
-source_set("common") {
- public_deps = [
- ":constants",
- ]
- deps = [
- "//base",
- "//sandbox",
- ]
- sources = [
- "thunk_getter.cc",
- "thunk_getter.h",
- ]
-}
-
-source_set("breakpad") {
- include_dirs = [ "$target_gen_dir" ]
- sources = [
- "breakpad.cc",
- "breakpad.h",
- ]
- deps = [
- ":common",
- "//base",
- "//breakpad:breakpad_handler",
- "//chrome/common:version_header",
- "//chrome/install_static:install_static_util",
- ]
-}
-
source_set("dll_hash") {
deps = [
"//base",
@@ -112,6 +95,10 @@ source_set("dll_hash") {
]
}
+##------------------------------------------------------------------------------
+## chrome_elf sub targets
+##------------------------------------------------------------------------------
+
executable("dll_hash_main") {
sources = [
"dll_hash/dll_hash_main.cc",
@@ -135,13 +122,44 @@ static_library("blacklist") {
]
deps = [
":breakpad",
- ":common",
":constants",
+ ":hook_util",
+ "//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
+
+ # Still uses base/win/pe_image.h
"//base",
+ ]
+}
+
+static_library("breakpad") {
+ include_dirs = [ "$target_gen_dir" ]
+ sources = [
+ "breakpad/breakpad.cc",
+ "breakpad/breakpad.h",
+ ]
+ deps = [
+ "//breakpad:breakpad_handler",
+ "//chrome/common:version_header",
"//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
]
}
+static_library("hook_util") {
+ sources = [
+ "hook_util/thunk_getter.cc",
+ "hook_util/thunk_getter.h",
+ ]
+ deps = [
+ "//sandbox",
+ ]
+}
+
+##------------------------------------------------------------------------------
+## tests
+##------------------------------------------------------------------------------
+
test("chrome_elf_unittests") {
output_name = "chrome_elf_unittests"
sources = [
@@ -154,12 +172,14 @@ test("chrome_elf_unittests") {
deps = [
":blacklist",
":blacklist_test_main_dll",
- ":common",
+ ":constants",
+ ":hook_util",
"//base",
"//base/test:test_support",
"//chrome",
"//chrome/common:version_header",
"//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
"//sandbox",
"//testing/gtest",
]
@@ -198,10 +218,10 @@ shared_library("blacklist_test_main_dll") {
]
deps = [
":blacklist",
- ":common",
"//base",
"//build/config/sanitizers:deps",
"//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
]
}
« no previous file with comments | « chrome/install_static/install_util_unittest.cc ('k') | chrome_elf/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698