Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: gears/SConscript

Issue 18299: Changes to make it possible to statically link Gears. This is disabled by an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_plugin_lib.cc ('k') | gears/SConscript.browser » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gears/SConscript
===================================================================
--- gears/SConscript (revision 8198)
+++ gears/SConscript (working copy)
@@ -74,7 +74,9 @@
EnumVariable('MODE',
'Type of binary to generate', 'dbg', ['dbg', 'opt']),
BoolVariable('OFFICIAL_BUILD',
- 'Create a binary suitable for public release', 0)
+ 'Create a binary suitable for public release', 0),
+ BoolVariable('GEARS_STATIC_LIB',
+ 'Create a static library for linking with Chrome', 0),
)
vars.Update(env)
@@ -349,15 +351,24 @@
CPPDEFINES = 'OFFICIAL_BUILD=1',
M4FLAGS = '-DOFFICIAL_BUILD=1',
)
+if env['GEARS_STATIC_LIB']:
+ env.Append(
+ CPPDEFINES = 'GEARS_STATIC_LIB=1',
+ )
# TODO: if USING_LIBPNG
env.Append(
CPPDEFINES = [
'PNG_USER_CONFIG',
'CHROME_PNG_WRITE_SUPPORT',
- 'GEARS_PNG_BUILD',
]
)
+if not env['GEARS_STATIC_LIB']:
+ # If we're not linking with Chrome, don't prefix all the symbols with
+ # webkit_.
+ env.Append(CPPDEFINES = ['GEARS_PNG_BUILD'])
+
+
# TODO: if USING_ZLIB
env.Append(
CPPDEFINES = [
@@ -468,7 +479,6 @@
],
CPPFLAGS = [
'/nologo',
- '/Zc:wchar_t-',
'/c',
'/W3',
'/WX',
@@ -600,6 +610,15 @@
'/OPT:ICF',
],
)
+ if not env['GEARS_STATIC_LIB']:
+ # Build with 2-byte wchar_t's only if we're building a DLL. To link with
+ # Chrome, we need 4-byte wchar_t.
+ env.Append(
+ CPPFLAGS = [
+ '/Zc:wchar_t-',
+ ],
+ )
+
#--------------------------- LINUX ---------------------------
elif env['OS'] == 'linux':
env.Append(
« no previous file with comments | « chrome/common/chrome_plugin_lib.cc ('k') | gears/SConscript.browser » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698