summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 08:19:28 +0000
committeryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 08:19:28 +0000
commit699d6248ec0121a5513378ec4875492d9f91ca97 (patch)
tree5fc1173f7b378784f387b9778211af453c71bf9d
parent785df74a997943076bbb68bf7dc8fba9f4347e44 (diff)
downloadchromium_src-699d6248ec0121a5513378ec4875492d9f91ca97.zip
chromium_src-699d6248ec0121a5513378ec4875492d9f91ca97.tar.gz
chromium_src-699d6248ec0121a5513378ec4875492d9f91ca97.tar.bz2
Revert "Add COMPONENT_BUILD global define. "
The change broke compilation on Linux Builder (dbg)(shared): http://build.chromium.org/p/chromium/builders/Linux%20Builder%20%28dbg%29%28shared%29/builds/3365/steps/compile/logs/stdio TBR=darin BUG=None TEST=None Review URL: http://codereview.chromium.org/7352014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92329 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/at_exit.cc2
-rw-r--r--base/base.gypi49
-rw-r--r--base/base_api.h4
-rw-r--r--base/debug/debug_on_start_win.h4
-rw-r--r--base/logging.h2
-rw-r--r--build/common.gypi8
-rw-r--r--chrome/chrome.gyp2
-rw-r--r--chrome/chrome_dll.gypi1
-rw-r--r--chrome/chrome_exe.gypi1
-rw-r--r--crypto/crypto.gyp6
-rw-r--r--crypto/crypto_api.h4
-rw-r--r--ipc/ipc.gypi1
-rw-r--r--net/base/net_api.h4
-rw-r--r--net/base/ssl_false_start_blacklist.h4
-rw-r--r--net/net.gyp19
-rw-r--r--sandbox/sandbox.gyp1
-rw-r--r--ui/base/resource/resource_bundle_dummy.cc17
17 files changed, 62 insertions, 67 deletions
diff --git a/base/at_exit.cc b/base/at_exit.cc
index c7daad4..cafe75b 100644
--- a/base/at_exit.cc
+++ b/base/at_exit.cc
@@ -22,7 +22,7 @@ static AtExitManager* g_top_manager = NULL;
AtExitManager::AtExitManager() : next_manager_(g_top_manager) {
// If multiple modules instantiate AtExitManagers they'll end up living in this
// module... they have to coexist.
-#if !defined(COMPONENT_BUILD)
+#if !defined(BASE_DLL)
DCHECK(!g_top_manager);
#endif
g_top_manager = this;
diff --git a/base/base.gypi b/base/base.gypi
index ea23a8e..79bff9b 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -535,13 +535,25 @@
},],
[ 'component=="shared_library"', {
'defines': [
+ 'BASE_DLL',
'BASE_IMPLEMENTATION',
],
'conditions': [
['OS=="win"', {
+ 'msvs_disabled_warnings': [
+ 4251,
+ ],
'sources!': [
'debug/debug_on_start_win.cc',
],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'BASE_DLL',
+ ],
+ 'msvs_disabled_warnings': [
+ 4251,
+ ],
+ },
}],
],
}],
@@ -593,7 +605,7 @@
'targets': [
{
'target_name': 'base_nacl_win64',
- 'type': '<(component)',
+ 'type': 'static_library',
'variables': {
'base_target': 1,
},
@@ -619,41 +631,6 @@
'msvs_target_platform': 'x64',
},
},
- 'conditions': [
- [ 'component == "shared_library"', {
- 'defines': [
- 'BASE_IMPLEMENTATION',
- ],
- 'sources!': [
- 'debug/debug_on_start_win.cc',
- ],
- }],
- ],
- },
- {
- 'target_name': 'base_i18n_nacl_win64',
- 'type': 'static_library',
- # TODO(gregoryd): direct_dependent_settings should be shared with the
- # 32-bit target, but it doesn't work due to a bug in gyp
- 'direct_dependent_settings': {
- 'include_dirs': [
- '..',
- ],
- },
- 'defines': [
- '<@(nacl_win64_defines)',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'i18n/icu_util_nacl_win64.cc',
- ],
- 'configurations': {
- 'Common_Base': {
- 'msvs_target_platform': 'x64',
- },
- },
},
],
}],
diff --git a/base/base_api.h b/base/base_api.h
index deeae07..2361659 100644
--- a/base/base_api.h
+++ b/base/base_api.h
@@ -6,7 +6,7 @@
#define BASE_BASE_API_H_
#pragma once
-#if defined(COMPONENT_BUILD)
+#if defined(BASE_DLL)
#if defined(WIN32)
#if defined(BASE_IMPLEMENTATION)
@@ -19,7 +19,7 @@
#define BASE_API __attribute__((visibility("default")))
#endif
-#else // defined(COMPONENT_BUILD)
+#else // defined(BASE_DLL)
#define BASE_API
#endif
diff --git a/base/debug/debug_on_start_win.h b/base/debug/debug_on_start_win.h
index 86d4721..4a5c120 100644
--- a/base/debug/debug_on_start_win.h
+++ b/base/debug/debug_on_start_win.h
@@ -27,7 +27,7 @@ namespace debug {
// There is no way for this code, as currently implemented, to work across DLLs.
// TODO(rvargas): It looks like we really don't use this code, at least not for
// Chrome. Figure out if it's really worth implementing something simpler.
-#if !defined(COMPONENT_BUILD)
+#if !defined(BASE_DLL)
// Debug on start functions and data.
class DebugOnStart {
@@ -74,7 +74,7 @@ DECLSPEC_SELECTANY DebugOnStart::PIFV debug_on_start = &DebugOnStart::Init;
#endif // _WIN64
-#endif // defined(COMPONENT_BUILD)
+#endif // defined(BASE_DLL)
} // namespace debug
} // namespace base
diff --git a/base/logging.h b/base/logging.h
index d098937..849de0e 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -469,7 +469,7 @@ std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
}
// MSVC doesn't like complex extern templates and DLLs.
-#if !defined(COMPILER_MSVC) && defined(COMPONENT_BUILD)
+#if !defined(COMPILER_MSVC) && defined(BASE_DLL)
// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated
// in logging.cc.
extern template std::string* MakeCheckOpString<int, int>(
diff --git a/build/common.gypi b/build/common.gypi
index 9b67d73..4ed9fef 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -694,9 +694,6 @@
}, { # else: branding!="Chrome"
'defines': ['CHROMIUM_BUILD'],
}],
- ['component=="shared_library"', {
- 'defines': ['COMPONENT_BUILD'],
- }],
['toolkit_views==1', {
'defines': ['TOOLKIT_VIEWS=1'],
}],
@@ -925,11 +922,6 @@
},
},
}],
- ['OS=="win" and component=="shared_library"', {
- 'msvs_disabled_warnings': [
- 4251, # class 'std::xx' needs to have dll-interface.
- ],
- }],
['chromeos!=1', {
'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
}],
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index fed0468..6463e0e 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -39,8 +39,6 @@
'common_nacl_win64',
'common_constants_win64',
'installer_util_nacl_win64',
- '../base/base.gyp:base_static_win64',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
],
'allocator_target': '../base/allocator/allocator.gyp:allocator',
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index e8919b0..602e78c 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -588,7 +588,6 @@
'<@(nacl_win64_dependencies)',
'chrome_dll_version',
'nacl_win64',
- '../base/base.gyp:base_i18n_nacl_win64',
],
'defines': [
'<@(nacl_win64_defines)',
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 84810ee..6ab3910 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -505,7 +505,6 @@
'../breakpad/breakpad.gyp:breakpad_handler_win64',
'../breakpad/breakpad.gyp:breakpad_sender_win64',
'../base/base.gyp:base_nacl_win64',
- '../base/base.gyp:base_static_win64',
'../sandbox/sandbox.gyp:sandbox_win64',
],
'defines': [
diff --git a/crypto/crypto.gyp b/crypto/crypto.gyp
index f660e4cd..a6df806 100644
--- a/crypto/crypto.gyp
+++ b/crypto/crypto.gyp
@@ -76,8 +76,14 @@
}],
[ '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 2787af8..b8af452 100644
--- a/crypto/crypto_api.h
+++ b/crypto/crypto_api.h
@@ -6,7 +6,7 @@
#define CRYPTO_CRYPTO_API_H_
#pragma once
-#if defined(COMPONENT_BUILD)
+#if defined(CRYPTO_DLL)
#if defined(WIN32)
#if defined(CRYPTO_IMPLEMENTATION)
@@ -19,7 +19,7 @@
#define CRYPTO_API __attribute__((visibility("default")))
#endif
-#else // defined(COMPONENT_BUILD)
+#else // defined(CRYPTO_DLL)
#define CRYPTO_API
#endif
diff --git a/ipc/ipc.gypi b/ipc/ipc.gypi
index 38aead2..65966af 100644
--- a/ipc/ipc.gypi
+++ b/ipc/ipc.gypi
@@ -84,7 +84,6 @@
},
'dependencies': [
'../base/base.gyp:base_nacl_win64',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
],
# TODO(gregoryd): direct_dependent_settings should be shared with the
# 32-bit target, but it doesn't work due to a bug in gyp
diff --git a/net/base/net_api.h b/net/base/net_api.h
index 4b017fd..610e974 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(COMPONENT_BUILD)
+#if defined(NET_DLL)
#if defined(WIN32)
#if defined(NET_IMPLEMENTATION)
@@ -26,7 +26,7 @@
#define NET_TEST __attribute__((visibility("default")))
#endif
-#else /// defined(COMPONENT_BUILD)
+#else /// defined(NET_DLL)
#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 1759630..5222822 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 SSLFalseStartBlacklist {
+class NET_TEST 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")
- NET_TEST static bool IsMember(const char* host);
+ 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 31afc17..1eb0a8d 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -822,8 +822,27 @@
],
[ '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': [
diff --git a/sandbox/sandbox.gyp b/sandbox/sandbox.gyp
index a9ea6f4..26699ca 100644
--- a/sandbox/sandbox.gyp
+++ b/sandbox/sandbox.gyp
@@ -239,7 +239,6 @@
'dependencies': [
'../testing/gtest.gyp:gtest',
'../base/base.gyp:base_nacl_win64',
- '../base/base.gyp:base_static_win64',
],
'configurations': {
'Common_Base': {
diff --git a/ui/base/resource/resource_bundle_dummy.cc b/ui/base/resource/resource_bundle_dummy.cc
index 0dbf1f1..82afaab 100644
--- a/ui/base/resource/resource_bundle_dummy.cc
+++ b/ui/base/resource/resource_bundle_dummy.cc
@@ -8,19 +8,26 @@
#include "base/logging.h"
#include "base/synchronization/lock.h"
+#include "ui/gfx/font.h"
+#include "ui/gfx/platform_font_win.h"
// NOTE(gregoryd): This is a hack to avoid creating more nacl_win64-specific
// files. The font members of ResourceBundle are never initialized in our code
-// so we can get away with an empty class definition.
+// so this destructor is never called.
namespace gfx {
-class Font {};
+Font::~Font() {
+ NOTREACHED();
+}
+PlatformFontWin::HFontRef::~HFontRef() {
+ NOTREACHED();
+}
}
namespace ui {
ResourceBundle* ResourceBundle::g_shared_instance_ = NULL;
-// static
+/* static */
std::string ResourceBundle::InitSharedInstance(
const std::string& pref_locale) {
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
@@ -28,7 +35,7 @@ std::string ResourceBundle::InitSharedInstance(
return std::string();
}
-// static
+/* static */
void ResourceBundle::CleanupSharedInstance() {
if (g_shared_instance_) {
delete g_shared_instance_;
@@ -36,7 +43,7 @@ void ResourceBundle::CleanupSharedInstance() {
}
}
-// static
+/* static */
ResourceBundle& ResourceBundle::GetSharedInstance() {
// Must call InitSharedInstance before this function.
CHECK(g_shared_instance_ != NULL);