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

Unified Diff: chrome_elf/BUILD.gn

Issue 1890973005: Fix blacklist_test_dll_3 linking every time in GN Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blacklist_test
Patch Set: comment Created 4 years, 8 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 | no next file » | 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 218c2240a0fc86c3bd07196af7ebcd6e5a858097..31ea217ab86b84ecc1a43ee2ef873d915f9882ec 100644
--- a/chrome_elf/BUILD.gn
+++ b/chrome_elf/BUILD.gn
@@ -24,6 +24,7 @@ windows_manifest("chrome_elf_manifest") {
shared_library("chrome_elf") {
sources = [
+ "chrome_elf.def",
"chrome_elf_main.cc",
"chrome_elf_main.h",
]
@@ -37,10 +38,7 @@ shared_library("chrome_elf") {
]
configs += [ "//build/config/win:windowed" ]
configs -= [ "//build/config/win:console" ]
- ldflags = [
- "/NODEFAULTLIB:user32.lib",
- "/DEF:" + rebase_path("chrome_elf.def"),
- ]
+ ldflags = [ "/NODEFAULTLIB:user32.lib" ]
if (current_cpu == "x86") {
# Don"t set an x64 base address (to avoid breaking HE-ASLR).
ldflags += [ "/BASE:0x01c20000" ]
@@ -161,6 +159,7 @@ test("chrome_elf_unittests") {
shared_library("blacklist_test_main_dll") {
sources = [
"blacklist/test/blacklist_test_main_dll.cc",
+ "blacklist/test/blacklist_test_main_dll.def",
]
deps = [
":blacklist",
@@ -168,34 +167,34 @@ shared_library("blacklist_test_main_dll") {
"//base",
"//build/config/sanitizers:deps",
]
- ldflags =
- [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_main_dll.def",
- root_build_dir) ]
}
-shared_library("blacklist_test_dll_1") {
+loadable_module("blacklist_test_dll_1") {
sources = [
"blacklist/test/blacklist_test_dll_1.cc",
+ "blacklist/test/blacklist_test_dll_1.def",
]
- ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_1.def",
- root_build_dir) ]
deps = [
"//build/config/sanitizers:deps",
]
}
-shared_library("blacklist_test_dll_2") {
+loadable_module("blacklist_test_dll_2") {
sources = [
"blacklist/test/blacklist_test_dll_2.cc",
+ "blacklist/test/blacklist_test_dll_2.def",
]
- ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_2.def",
- root_build_dir) ]
deps = [
"//build/config/sanitizers:deps",
]
}
-shared_library("blacklist_test_dll_3") {
+# As-is, this does not generate a .lib file because there are no exports and no
+# .def file. The current definition of loadable_module does not declare a .lib
+# file as an output, so this is OK. If it did (or if this used shared_library
+# which does), Ninja would get confused and always rebuild this target because
+# it sees a declared output file but that file doesn't exist on disk.
+loadable_module("blacklist_test_dll_3") {
sources = [
"blacklist/test/blacklist_test_dll_3.cc",
]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698