summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 00:06:22 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 00:07:59 +0000
commitc9f5110c17265ccad812ee66777fb2bc539b18c2 (patch)
tree2ca81f76ae2adff95185862d9261700c75af7a2f
parent21e657e70100ae4528b0027ddc68611a64a6d8a5 (diff)
downloadchromium_src-c9f5110c17265ccad812ee66777fb2bc539b18c2.zip
chromium_src-c9f5110c17265ccad812ee66777fb2bc539b18c2.tar.gz
chromium_src-c9f5110c17265ccad812ee66777fb2bc539b18c2.tar.bz2
Move startup_helper_win.cc to separate target for incremental build
Currently, the .cc is included in multiple targets. In incremental builds this results in errors like: [609->8104/8713 ~0] LINK_EMBED unit_tests.exe FAILED: d:\src\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x86 True unit_tests.exe "d:\src\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x86 False link.exe /nologo /OUT:unit_tests.exe @unit_tests.exe.rsp" 1 mt.exe rc.exe "obj\chrome\unit_tests.unit_tests.exe.intermediate.manifest" obj\chrome\unit_tests.unit_tests.exe.generated.manifest ..\..\build\win\compatibility.manifest content_app_both.startup_helper_win.obj : error LNK2005: "void __cdecl content::InitializeSandboxInfo(struct sandbox::SandboxInterfaceInfo *)" (?InitializeSandboxInfo@content@@YAXPAUSandboxInterfaceInfo@sandbox@@@Z) already defined in test_support_content.startup_helper_win.obj content_app_both.startup_helper_win.obj : error LNK2005: "void __cdecl `anonymous namespace'::InvalidParameter(wchar_t const *,wchar_t const *,wchar_t const *,unsigned int,unsigned int)" (?InvalidParameter@?A0xc496daa2@@YAXPB_W00II@Z) already defined in test_support_content.startup_helper_win.obj content_app_both.startup_helper_win.obj : error LNK2005: "void __cdecl `anonymous namespace'::PureCall(void)" (?PureCall@?A0xc496daa2@@YAXXZ) already defined in test_support_content.startup_helper_win.obj content_app_both.startup_helper_win.obj : error LNK2005: "void __cdecl content::RegisterInvalidParamHandler(void)" (?RegisterInvalidParamHandler@content@@YAXXZ) already defined in test_support_content.startup_helper_win.obj content_app_both.startup_helper_win.obj : error LNK2005: "void __cdecl content::SetupCRT(class base::CommandLine const &)" (?SetupCRT@content@@YAXABVCommandLine@base@@@Z) already defined in test_support_content.startup_helper_win.obj unit_tests.exe : fatal error LNK1169: one or more multiply defined symbols found when incremental_chrome_dll=1 used in Release build. By putting the .cc in a static_library target and depending on it as necessary, rather than including the .cc into multiple places, this is avoided. R=jam@chromium.org TBR=sky@chromium.org BUG=404809 Review URL: https://codereview.chromium.org/470523005 Cr-Commit-Position: refs/heads/master@{#291256} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291256 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash.gyp8
-rw-r--r--chrome/chrome_exe.gypi2
-rw-r--r--content/content.gyp20
-rw-r--r--content/content_app.gypi12
-rw-r--r--content/content_shell.gypi1
-rw-r--r--content/content_tests.gypi2
-rw-r--r--ui/app_list/app_list.gyp2
-rw-r--r--ui/views/examples/examples.gyp2
8 files changed, 37 insertions, 12 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp
index 6c6b8a3..5e8383e 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -715,7 +715,6 @@
'test/ui_controls_factory_ash.h',
],
'ash_shell_lib_sources': [
- '../content/app/startup_helper_win.cc',
'../ui/views/test/test_views_delegate_aura.cc',
'shell/app_list.cc',
'shell/bubble.cc',
@@ -1199,6 +1198,13 @@
'sources': [
'<@(ash_shell_lib_sources)',
],
+ 'conditions': [
+ ['OS=="win"', {
+ 'dependencies': [
+ '../content/content.gyp:content_startup_helper_win',
+ ],
+ }],
+ ],
},
{
# GN version: //ash:ash_shell
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 418f0f1..64a6dcd 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -66,6 +66,8 @@
'app/client_util.h',
'app/signature_validator_win.cc',
'app/signature_validator_win.h',
+ # Note that due to InitializeSandboxInfo, this must be directly linked
+ # into chrome.exe, not into a dependent.
'<(DEPTH)/content/app/startup_helper_win.cc',
'<(DEPTH)/content/public/common/content_switches.cc',
],
diff --git a/content/content.gyp b/content/content.gyp
index f380cab..4da6428 100644
--- a/content/content.gyp
+++ b/content/content.gyp
@@ -28,6 +28,26 @@
'../build/win_precompile.gypi',
],
}],
+ ['OS == "win"', {
+ 'targets': [
+ {
+ 'target_name': 'content_startup_helper_win',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/base.gyp:base_i18n',
+ '../sandbox/sandbox.gyp:sandbox',
+ ],
+ 'sources': [
+ 'app/startup_helper_win.cc',
+ 'public/app/startup_helper_win.h',
+ ],
+ }
+ ],
+ }],
# In component mode, we build all of content as a single DLL.
# However, in the static mode, we need to build content as multiple
# targets in order to prevent dependencies from getting introduced
diff --git a/content/content_app.gypi b/content/content_app.gypi
index 0684e41..00ee842 100644
--- a/content/content_app.gypi
+++ b/content/content_app.gypi
@@ -26,13 +26,11 @@
'app/content_main_runner.cc',
'app/mojo/mojo_init.cc',
'app/mojo/mojo_init.h',
- 'app/startup_helper_win.cc',
'public/app/android_library_loader_hooks.h',
'public/app/content_main.h',
'public/app/content_main_delegate.cc',
'public/app/content_main_delegate.h',
'public/app/content_main_runner.h',
- 'public/app/startup_helper_win.h',
],
'conditions': [
['((OS=="linux" and os_posix==1 and use_aura==1) or OS=="android") and use_allocator!="none"', {
@@ -41,11 +39,6 @@
'../base/allocator/allocator.gyp:allocator',
],
}],
- ['OS=="win"', {
- 'dependencies': [
- '../sandbox/sandbox.gyp:sandbox',
- ],
- }],
['OS=="android"', {
'sources!': [
'app/content_main.cc',
@@ -58,6 +51,11 @@
'../build/android/cpufeatures.gypi',
],
}],
+ ['OS=="win"', {
+ 'dependencies': [
+ 'content_startup_helper_win',
+ ],
+ }],
['OS=="ios"', {
'sources!': [
'app/content_main.cc',
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index 92a5a17..5d92406 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -501,7 +501,6 @@
'..',
],
'sources': [
- 'app/startup_helper_win.cc',
'shell/app/shell_main.cc',
],
'mac_bundle_resources': [
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index 76cc068..e1d1692 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -84,7 +84,6 @@
'public/test/unittest_test_suite.h',
'public/test/web_contents_tester.cc',
'public/test/web_contents_tester.h',
- 'app/startup_helper_win.cc',
# TODO(phajdan.jr): All of those files should live in content/test (if
# they're only used by content) or content/public/test (if they're used
# by other embedders).
@@ -292,6 +291,7 @@
['OS == "win"', {
'dependencies': [
'../sandbox/sandbox.gyp:sandbox',
+ 'content.gyp:content_startup_helper_win',
],
}],
['enable_webrtc==1', {
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index 74f022d..d540040 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -284,7 +284,6 @@
'target_name': 'app_list_demo',
'type': 'executable',
'sources': [
- '../../content/app/startup_helper_win.cc',
'demo/app_list_demo_views.cc',
],
'dependencies': [
@@ -312,6 +311,7 @@
},
'dependencies': [
'../../sandbox/sandbox.gyp:sandbox',
+ '../../content/content.gyp:content_startup_helper_win',
],
}],
],
diff --git a/ui/views/examples/examples.gyp b/ui/views/examples/examples.gyp
index 4cf3a1b..c529565 100644
--- a/ui/views/examples/examples.gyp
+++ b/ui/views/examples/examples.gyp
@@ -156,7 +156,6 @@
'views_examples_with_content_lib',
],
'sources': [
- '../../../content/app/startup_helper_win.cc',
'examples_with_content_main_exe.cc',
],
'conditions': [
@@ -179,6 +178,7 @@
},
'dependencies': [
'../../../sandbox/sandbox.gyp:sandbox',
+ '../../../content/content.gyp:content_startup_helper_win',
],
}],
],