diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 20:41:28 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 20:41:28 +0000 |
commit | 63e39a28e492e8f9a10d05cd970da2a1d539c0f3 (patch) | |
tree | 60271c1be8eceb87e0f8206d18f65a88b5a3d286 /crypto | |
parent | 8c01b7f619cb7a166c2b78269aed9f2333ad89c9 (diff) | |
download | chromium_src-63e39a28e492e8f9a10d05cd970da2a1d539c0f3.zip chromium_src-63e39a28e492e8f9a10d05cd970da2a1d539c0f3.tar.gz chromium_src-63e39a28e492e8f9a10d05cd970da2a1d539c0f3.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,evan
Review URL: http://codereview.chromium.org/7344022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/crypto.gyp | 6 | ||||
-rw-r--r-- | crypto/crypto_api.h | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/crypto/crypto.gyp b/crypto/crypto.gyp index a6df806..f660e4cd 100644 --- a/crypto/crypto.gyp +++ b/crypto/crypto.gyp @@ -76,14 +76,8 @@ }], [ 'component == "shared_library"', { 'defines': [ - 'CRYPTO_DLL', 'CRYPTO_IMPLEMENTATION', ], - 'direct_dependent_settings': { - 'defines': [ - 'CRYPTO_DLL', - ], - }, }], [ 'use_openssl==1', { # TODO(joth): Use a glob to match exclude patterns once the diff --git a/crypto/crypto_api.h b/crypto/crypto_api.h index b8af452..2787af8 100644 --- a/crypto/crypto_api.h +++ b/crypto/crypto_api.h @@ -6,7 +6,7 @@ #define CRYPTO_CRYPTO_API_H_ #pragma once -#if defined(CRYPTO_DLL) +#if defined(COMPONENT_BUILD) #if defined(WIN32) #if defined(CRYPTO_IMPLEMENTATION) @@ -19,7 +19,7 @@ #define CRYPTO_API __attribute__((visibility("default"))) #endif -#else // defined(CRYPTO_DLL) +#else // defined(COMPONENT_BUILD) #define CRYPTO_API #endif |