diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-20 19:21:41 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-20 19:21:41 +0000 |
commit | b03477f172bb933acc6ab05af452e2999431d817 (patch) | |
tree | 3fa8c1cefd16217ac2114d5086c0b923137e64df /build | |
parent | 762190afe1ba4257d3f5b39fd24b4e43f5ba9f3e (diff) | |
download | chromium_src-b03477f172bb933acc6ab05af452e2999431d817.zip chromium_src-b03477f172bb933acc6ab05af452e2999431d817.tar.gz chromium_src-b03477f172bb933acc6ab05af452e2999431d817.tar.bz2 |
Identify data exports during split_link
Generates proper .def files that include "DATA" so that non-functions are
correctly exported.
However, for split_link because the "other" side won't import them properly
(__declspec(dllimport) is required) split_link notes them, and errors out.
This also adds support for linking individual objs out of libs so that some
_constants.cc and _switches.cc files can easily be linked into both DLLs.
R=cpu@chromium.org
BUG=237249
Review URL: https://codereview.chromium.org/15310002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/split_link_partition.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/build/split_link_partition.py b/build/split_link_partition.py index 60409d2..422c3d1 100644 --- a/build/split_link_partition.py +++ b/build/split_link_partition.py @@ -114,6 +114,51 @@ r'^ws2_32\.lib$', ], + # objs split out of libs. These will be extracted from whichever side + # they're not on according to the 'parts' split, and then just the obj + # linked into the other side. Each should be a 2-tuple, where the first is + # a regex for the .lib name, and the second is a regex for the .obj from + # that lib. The lib should not match anything in 'all'. + # + # Note: If you're considering adding something that isn't a _switches or a + # _constants file, it'd probably be better to break the target into separate + # .lib files. + 'all_from_libs': [ + (r'autofill_common\.lib$', r'switches\.obj$'), + (r'base_static\.lib$', r'base_switches\.obj$'), + # TODO(scottmg): This one is not solely constants, but looks safe. + (r'browser_extensions\.lib$', r'tab_capture_api\.obj$'), + (r'\bcc\.lib$', r'switches\.obj$'), + (r'\bcommon\.lib$', r'extension_constants\.obj$'), + (r'\bcommon\.lib$', r'extension_manifest_constants\.obj$'), + (r'\bcommon\.lib$', r'url_constants\.obj$'), + (r'\bcommon\.lib$', r'view_type\.obj$'), + # It sort of looks like most of this lib could go in 'all', but there's a + # couple registration/initialization functions that make me a bit nervous. + (r'common_constants\.lib$', r'chrome_constants\.obj$'), + (r'common_constants\.lib$', r'chrome_switches\.obj$'), + (r'common_constants\.lib$', r'pref_names\.obj$'), + (r'content_common\.lib$', r'browser_plugin_constants\.obj$'), + (r'content_common\.lib$', r'content_constants\.obj$'), + (r'content_common\.lib$', r'content_switches\.obj$'), + (r'content_common\.lib$', r'page_zoom\.obj$'), + (r'content_common\.lib$', r'url_constants\.obj$'), + (r'gl_wrapper\.lib$', r'gl_switches\.obj$'), + # TODO(scottmg): This one is not solely constants, but looks safe. + (r'libjingle_webrtc_common\.lib$', r'mediaconstraintsinterface\.obj$'), + (r'\bmedia\.lib$', r'media_switches\.obj$'), + # TODO(scottmg): This one is not solely constants, but looks safe. + (r'\bnet\.lib$', r'http_request_headers\.obj$'), + (r'ppapi_shared\.lib$', r'ppapi_switches\.obj$'), + (r'printing\.lib$', r'print_job_constants\.obj$'), + (r'skia\.lib$', r'skunpremultiply\.obj$'), + (r'\bui\.lib$', r'favicon_size\.obj$'), + (r'\bui\.lib$', r'ui_base_switches\.obj$'), + (r'webkit.*plugins_common\.lib$', r'plugin_switches\.obj$'), + (r'webkit.*plugins_common\.lib$', r'plugin_constants'), + (r'webkit.*storage\.lib$', r'file_permission_policy\.obj$'), + ], + # This manifest will be merged with the intermediate one from the linker, # and embedded in both DLLs. 'manifest': '..\\..\\chrome\\app\\chrome.dll.manifest' |