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

Unified Diff: chrome_elf/BUILD.gn

Issue 2242323002: Revert of [chrome_elf] Big cleanup and removing dependencies that recently crept in. Part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | chrome_elf/blacklist.gypi » ('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 3de5fb3e83b1697adbb900f5bf83f7cecbad59a4..5cc27bdf330d2cf70d2459ad86c098a2e294b632 100644
--- a/chrome_elf/BUILD.gn
+++ b/chrome_elf/BUILD.gn
@@ -33,6 +33,9 @@
# in the world.
shared_library("chrome_elf") {
sources = [
+ "//chrome/app/chrome_crash_reporter_client_win.cc",
+ "//chrome/app/chrome_crash_reporter_client_win.h",
+ "//chrome/common/chrome_result_codes.h",
"chrome_elf.def",
"chrome_elf_main.cc",
"chrome_elf_main.h",
@@ -41,24 +44,31 @@
":blacklist",
":chrome_elf_manifest",
":chrome_elf_resources",
- ":constants",
- ":crash",
+ ":chrome_elf_security",
+ ":constants",
":hook_util",
- ":security",
- "//build/config/sanitizers:deps",
- "//chrome/install_static:install_static_util",
- "//chrome_elf/nt_registry:nt_registry",
+ "//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",
+ "//third_party/crashpad/crashpad/client:client",
]
configs += [ "//build/config/win:windowed" ]
configs -= [ "//build/config/win:console" ]
-
- # Delay loads in this list will prevent user32.dll
- # from loading too early.
ldflags = [
- "/DELAYLOAD:advapi32.dll",
+ "/NODEFAULTLIB:user32.lib",
"/DELAYLOAD:dbghelp.dll",
+ "/DELAYLOAD:ole32.dll",
+ "/DELAYLOAD:psapi.dll",
"/DELAYLOAD:rpcrt4.dll",
+ "/DELAYLOAD:shell32.dll",
+ "/DELAYLOAD:user32.dll",
+ "/DELAYLOAD:winhttp.dll",
"/DELAYLOAD:winmm.dll",
+ "/DELAYLOAD:ws2_32.dll",
]
if (current_cpu == "x86") {
# Don"t set an x64 base address (to avoid breaking HE-ASLR).
@@ -70,7 +80,7 @@
## source sets
##------------------------------------------------------------------------------
-source_set("security") {
+source_set("chrome_elf_security") {
sources = [
"chrome_elf_security.cc",
"chrome_elf_security.h",
@@ -119,48 +129,30 @@
"blacklist/blacklist.h",
"blacklist/blacklist_interceptions.cc",
"blacklist/blacklist_interceptions.h",
+ "blacklist/crashpad_helper.cc",
+ "blacklist/crashpad_helper.h",
]
public_deps = [
"//sandbox",
]
deps = [
":constants",
- ":crash",
":hook_util",
- "//base:base_static", # pe_image
- "//chrome/install_static:install_static_util",
- "//chrome_elf/nt_registry:nt_registry",
- ]
-}
-
-static_library("crash") {
- sources = [
- "../chrome/app/chrome_crash_reporter_client_win.cc",
- "../chrome/app/chrome_crash_reporter_client_win.h",
- "../chrome/common/chrome_result_codes.h",
- "crash/crash_helper.cc",
- "crash/crash_helper.h",
- ]
- deps = [
- ":hook_util",
- "//base:base", # This needs to go. DEP of app, crash_keys, client.
- "//base:base_static", # pe_image
- "//chrome/install_static:install_static_util",
- "//components/crash/content/app:app",
- "//components/crash/core/common", # crash_keys
- "//content/public/common:result_codes",
- "//third_party/crashpad/crashpad/client:client", # DumpWithoutCrash
+ "//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
+
+ # Still uses base/win/pe_image.h
+ "//base",
+ "//third_party/crashpad/crashpad/client:client",
]
}
static_library("hook_util") {
sources = [
- "../base/macros.h",
- "hook_util/hook_util.cc",
- "hook_util/hook_util.h",
- ]
- deps = [
- "//base:base_static", # pe_image
+ "hook_util/thunk_getter.cc",
+ "hook_util/thunk_getter.h",
+ ]
+ deps = [
"//sandbox",
]
}
@@ -175,18 +167,15 @@
"blacklist/test/blacklist_test.cc",
"chrome_elf_util_unittest.cc",
"elf_imports_unittest.cc",
- "hook_util/test/hook_util_test.cc",
"run_all_unittests.cc",
]
include_dirs = [ "$target_gen_dir" ]
deps = [
":blacklist",
":blacklist_test_main_dll",
- ":constants",
- ":crash",
+ ":chrome_elf_security",
+ ":constants",
":hook_util",
- ":hook_util_test_dll",
- ":security",
"//base",
"//base/test:test_support",
"//chrome",
@@ -210,29 +199,43 @@
":blacklist_test_dll_3",
":chrome_elf",
]
-
- # Don't want the test-specific dependencies to affect ChromeElfLoadSanityTest.
- # In particular, a few system DLLs cause user32 to be loaded, which is bad.
ldflags = [
- "/DELAYLOAD:advapi32.dll",
+ "/DELAYLOAD:dbghelp.dll",
"/DELAYLOAD:ole32.dll",
+ "/DELAYLOAD:psapi.dll",
+ "/DELAYLOAD:rpcrt4.dll",
+ "/DELAYLOAD:shell32.dll",
+ "/DELAYLOAD:shlwapi.dll",
+ "/DELAYLOAD:user32.dll",
+ "/DELAYLOAD:winhttp.dll",
+ "/DELAYLOAD:winmm.dll",
+ "/DELAYLOAD:ws2_32.dll",
+ ]
+}
+
+shared_library("blacklist_test_main_dll") {
+ sources = [
+ "blacklist/test/blacklist_test_main_dll.cc",
+ "blacklist/test/blacklist_test_main_dll.def",
+ ]
+ deps = [
+ ":blacklist",
+ "//base",
+ "//build/config/sanitizers:deps",
+ "//chrome/install_static:install_static_util",
+ "//chrome_elf/nt_registry:nt_registry",
+ ]
+ ldflags = [
+ "/NODEFAULTLIB:user32.lib",
+ "/DELAYLOAD:dbghelp.dll",
+ "/DELAYLOAD:ole32.dll",
+ "/DELAYLOAD:psapi.dll",
+ "/DELAYLOAD:rpcrt4.dll",
"/DELAYLOAD:shell32.dll",
"/DELAYLOAD:user32.dll",
+ "/DELAYLOAD:winhttp.dll",
"/DELAYLOAD:winmm.dll",
- ]
-}
-
-shared_library("blacklist_test_main_dll") {
- sources = [
- "blacklist/test/blacklist_test_main_dll.cc",
- "blacklist/test/blacklist_test_main_dll.def",
- ]
- deps = [
- ":blacklist",
- "//base",
- "//build/config/sanitizers:deps",
- "//chrome/install_static:install_static_util",
- "//chrome_elf/nt_registry:nt_registry",
+ "/DELAYLOAD:ws2_32.dll",
]
}
@@ -269,13 +272,3 @@
"//build/config/sanitizers:deps",
]
}
-
-shared_library("hook_util_test_dll") {
- sources = [
- "hook_util/test/hook_util_test_dll.cc",
- "hook_util/test/hook_util_test_dll.h",
- ]
- deps = [
- "//build/config/sanitizers:deps",
- ]
-}
« no previous file with comments | « no previous file | chrome_elf/blacklist.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698