diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 07:12:35 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 07:12:35 +0000 |
commit | b2ff764f2e40a49c8422b8119117bb610da5ac77 (patch) | |
tree | 0ed470d61100c919cea1782d42298654c3166d2e /net | |
parent | 6f4c7e1d09609b8276aa2848ca9e513d513d6bf3 (diff) | |
download | chromium_src-b2ff764f2e40a49c8422b8119117bb610da5ac77.zip chromium_src-b2ff764f2e40a49c8422b8119117bb610da5ac77.tar.gz chromium_src-b2ff764f2e40a49c8422b8119117bb610da5ac77.tar.bz2 |
Add COMPONENT_BUILD global define.
This avoids the need to define FOO_DLL macros for each project that we wish to
optionally build as a DLL (when component=="shared_library"). This in turn
means that we do not need direct_dependent_settings to define FOO_DLL, and that
means that we don't need to update projects to convert transitive dependencies
into explicit dependencies. This makes the component build more consistent
with the static build.
An alternative would be to use all_dependent_settings, but I feel that the
global approach is simpler as it creates less repetition in each target
definition for components.
A side-effect of this change is that I needed to make base_nacl_win64 be a
shared_library in the component build.
R=rvargas,bradnelson
Review URL: http://codereview.chromium.org/7344022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/net_api.h | 4 | ||||
-rw-r--r-- | net/base/ssl_false_start_blacklist.h | 4 | ||||
-rw-r--r-- | net/net.gyp | 19 |
3 files changed, 4 insertions, 23 deletions
diff --git a/net/base/net_api.h b/net/base/net_api.h index 610e974..4b017fd 100644 --- a/net/base/net_api.h +++ b/net/base/net_api.h @@ -10,7 +10,7 @@ // exported to consumers, and NET_TEST that allows unit tests to access features // not intended to be used directly by real consumers. -#if defined(NET_DLL) +#if defined(COMPONENT_BUILD) #if defined(WIN32) #if defined(NET_IMPLEMENTATION) @@ -26,7 +26,7 @@ #define NET_TEST __attribute__((visibility("default"))) #endif -#else /// defined(NET_DLL) +#else /// defined(COMPONENT_BUILD) #define NET_API #define NET_TEST #endif diff --git a/net/base/ssl_false_start_blacklist.h b/net/base/ssl_false_start_blacklist.h index 5222822..1759630 100644 --- a/net/base/ssl_false_start_blacklist.h +++ b/net/base/ssl_false_start_blacklist.h @@ -14,11 +14,11 @@ namespace net { // to TLS False Start. Because this set is several hundred long, it's // precompiled by the code in ssl_false_start_blacklist_process.cc into a hash // table for fast lookups. -class NET_TEST SSLFalseStartBlacklist { +class SSLFalseStartBlacklist { public: // IsMember returns true if the given host is in the blacklist. // host: a DNS name in dotted form (i.e. "www.example.com") - static bool IsMember(const char* host); + NET_TEST static bool IsMember(const char* host); // Hash returns the modified djb2 hash of the given string. static unsigned Hash(const char* str) { diff --git a/net/net.gyp b/net/net.gyp index 1eb0a8d..31afc17 100644 --- a/net/net.gyp +++ b/net/net.gyp @@ -822,27 +822,8 @@ ], [ 'component == "shared_library"', { 'defines': [ - 'NET_DLL', 'NET_IMPLEMENTATION', ], - 'direct_dependent_settings': { - 'defines': [ - 'NET_DLL', - ], - }, - 'conditions': [ - [ 'OS == "win"', { - 'msvs_disabled_warnings': [ - # class 'std::xx' needs to have dll-interface. - 4251, - ], - 'direct_dependent_settings': { - 'msvs_disabled_warnings': [ - 4251, - ], - }, - }], - ], }], [ 'OS == "mac"', { 'dependencies': [ |