Skip to content

Commit

Permalink
Mass convert ChromeStaticLibrary -> ChromeLibrary, including pulling …
Browse files Browse the repository at this point in the history
…the updated ICU dep that uses it as well.

Add a SHARED scons command-line flag to build shared libraries.

Review URL: http://codereview.chromium.org/16477


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7479 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
evanm@google.com committed Dec 26, 2008
1 parent 1c4fdfb commit de2c4cc
Show file tree
Hide file tree
Showing 45 changed files with 51 additions and 47 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deps = {
"/trunk/deps/third_party/WebKit@7457",

"src/third_party/icu38":
"/trunk/deps/third_party/icu38@7121",
"/trunk/deps/third_party/icu38@7478",

"src/v8":
"http://v8.googlecode.com/svn/trunk@968",
Expand Down
2 changes: 1 addition & 1 deletion base/base_lib.scons
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ if env.Bit('linux'):
'worker_pool.cc',
])

env.ChromeStaticLibrary('base', input_files)
env.ChromeLibrary('base', input_files)

p = env.ChromeMSVSProject('build/base.vcproj',
guid='{1832A374-8A74-4F9E-B536-69A699B3E165}',
Expand Down
2 changes: 1 addition & 1 deletion base/gfx/base_gfx.scons
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ elif env.Bit('linux'):
input_files.Extend([
])

env.ChromeStaticLibrary('base_gfx', input_files)
env.ChromeLibrary('base_gfx', input_files)

p = env.ChromeMSVSProject('../build/base_gfx.vcproj',
guid='{A508ADD3-CECE-4E0F-8448-2F5E454DF551}',
Expand Down
4 changes: 2 additions & 2 deletions breakpad/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if env.Bit('windows'):
'src/common/windows/http_upload.cc',
]

env.ChromeStaticLibrary('breakpad_sender', sender_input_files)
env.ChromeLibrary('breakpad_sender', sender_input_files)

env.ChromeMSVSProject('$BREAKPAD_DIR/breakpad_sender.vcproj',
guid='{9946A048-043B-4F8F-9E07-9297B204714C}')
Expand All @@ -48,7 +48,7 @@ elif env.Bit('linux'):
'src/client/linux/handler/linux_thread.cc',
]

env.ChromeStaticLibrary('breakpad_handler', handler_input_files)
env.ChromeLibrary('breakpad_handler', handler_input_files)

env.ChromeMSVSProject('$BREAKPAD_DIR/breakpad_handler.vcproj',
guid='{B55CA863-B374-4BAF-95AC-539E4FA4C90C}')
Expand Down
4 changes: 4 additions & 0 deletions build/SConscript.main
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ if ARGUMENTS.get('PROFILE') == '1':
if ARGUMENTS.get('SYMBOLS') == '1':
linux_env.Append(CCFLAGS=['-g'])

# Build shared libraries (useful for fast links) when SHARED=1.
if ARGUMENTS.get('SHARED') == '1':
linux_env.Replace(COMPONENT_STATIC=False)

# Build with system-provided NSS and GTK.
if root_env['PLATFORM'] in ['linux', 'linux2', 'posix']:
try:
Expand Down
6 changes: 3 additions & 3 deletions build/SConscript.v8
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ if env.Bit('windows'):
# TODO(evanm): this may be necessary on other platforms(?)
i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8[0])

env.ChromeStaticLibrary('v8_snapshot',
['$V8_MODE_DIR/libraries-empty${OBJSUFFIX}',
'$V8_MODE_DIR/snapshot${OBJSUFFIX}'])
env.ChromeLibrary('v8_snapshot',
['$V8_MODE_DIR/libraries-empty${OBJSUFFIX}',
'$V8_MODE_DIR/snapshot${OBJSUFFIX}'])

env.ChromeMSVSProject('$V8_DIR/tools/visual_studio/v8.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion build/googleurl_lib.scons
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ input_files = [
'src/url_util.cc',
]

env.ChromeStaticLibrary('googleurl', input_files)
env.ChromeLibrary('googleurl', input_files)

env.ChromeMSVSProject('$GOOGLEURL_DIR/build/googleurl.vcproj',
guid='{EF5E94AB-B646-4E5B-A058-52EF07B8351C}')
2 changes: 1 addition & 1 deletion chrome/browser/browser.scons
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ if env.Bit('posix'):

if not env.Bit('mac'):
# TODO: This should work for all platforms.
env.ChromeStaticLibrary('browser', input_files)
env.ChromeLibrary('browser', input_files)

env.ChromeMSVSProject('$CHROME_DIR/browser/browser.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/debugger/debugger.scons
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if env.Bit('mac'):

if not env.Bit('mac'):
# TODO(port): Enable for Mac.
env.ChromeStaticLibrary('debugger', input_files)
env.ChromeLibrary('debugger', input_files)

env.ChromeMSVSProject('$CHROME_DIR/browser/debugger/debugger.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/views/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ if env.Bit('windows'):
'find_bar_win.cc',
])

env.ChromeStaticLibrary('browser_views', input_files)
env.ChromeLibrary('browser_views', input_files)

env.ChromeMSVSProject('$CHROME_DIR/browser/views/browser_views.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/common.scons
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ if env.Bit('posix'):

if not env.Bit('mac'):
# TODO(port): This should be enabled for all platforms.
env.ChromeStaticLibrary('common', input_files)
env.ChromeLibrary('common', input_files)

env.ChromeMSVSProject('$CHROME_DIR/common/common.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/installer/util/util.scons
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ input_files = [

# TODO(port):
if env.Bit('windows'):
env.ChromeStaticLibrary('util', input_files)
env.ChromeLibrary('util', input_files)

env.ChromeMSVSProject('$CHROME_DIR/installer/util/util.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/plugin/plugin.scons
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if env.Bit('posix'):
for remove in to_be_ported_files:
input_files.remove(remove)

env.ChromeStaticLibrary('plugin', input_files)
env.ChromeLibrary('plugin', input_files)

env.ChromeMSVSProject('$CHROME_DIR/plugin/plugin.vcproj',
guid='{20A560A0-2CD0-4D9E-A58B-1F24B99C087A}')
2 changes: 1 addition & 1 deletion chrome/renderer/renderer.scons
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if env.Bit('mac'):

# TODO(port): Enable for Mac.
if not env.Bit('mac'):
env.ChromeStaticLibrary('renderer', input_files)
env.ChromeLibrary('renderer', input_files)

env.ChromeMSVSProject('$CHROME_DIR/renderer/renderer.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/test/automation/automation.scons
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ input_files = [

# TODO(port):
if env.Bit('windows'):
env.ChromeStaticLibrary('automation', input_files)
env.ChromeLibrary('automation', input_files)

env.ChromeMSVSProject('$CHROME_DIR/test/automation/automation.vcproj',
guid='{1556EF78-C7E6-43C8-951F-F6B43AC0DD12}')
2 changes: 1 addition & 1 deletion chrome/third_party/hunspell/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ input_files = [
'src/parsers/textparser.cxx',
]

env.ChromeStaticLibrary('hunspell', input_files)
env.ChromeLibrary('hunspell', input_files)


dictionaries = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/views/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ input_files = [
'window_delegate.cc',
]

env.ChromeStaticLibrary('views', input_files)
env.ChromeLibrary('views', input_files)

env.ChromeMSVSProject('$CHROME_DIR/views/views.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion gears/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ elif env['OS'] == 'android':
# that value, scons gets confused. I'm not sure who is at fault here.
# See http://code.google.com/p/chromium/issues/detail?id=4177.
def GearsStaticLibrary(env, *args, **kw):
lib = env.ChromeStaticLibrary(*args, **kw)
lib = env.ChromeLibrary(*args, **kw)
env.Install('$COMPONENT_LIBRARY_DIR', lib[0])
return lib
env.AddMethod(GearsStaticLibrary)
Expand Down
2 changes: 1 addition & 1 deletion gears/SConscript.browser
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ if env['OS'] in ['win32', 'wince'] and env['MODE'] == 'dbg':
env.Alias('gears', outputs['MODULE'])

if env['OS'] == 'win32' and env['BROWSER'] == 'NPAPI':
lib = env.ChromeStaticLibrary('gears-static',
lib = env.ChromeLibrary('gears-static',
env.SharedObject(GetInputs('$BROWSER_CPPSRCS')) +
GetInputs('$BROWSER_LINKSRCS'))
env.Alias('gears-static', lib)
Expand Down
2 changes: 1 addition & 1 deletion media/media_lib.scons
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if env.Bit('posix'):
input_files.extend([
])

env.ChromeStaticLibrary('media', input_files)
env.ChromeLibrary('media', input_files)

env.ChromeMSVSProject('$MEDIA_DIR/build/media.vcproj',
guid='{6AE76406-B03B-11DD-94B1-80B556D89593}')
2 changes: 1 addition & 1 deletion net/net_lib.scons
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ if env.Bit('windows'):
env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h'])
input_files += [obj]

env.ChromeStaticLibrary('net', input_files)
env.ChromeLibrary('net', input_files)

env.ChromeMSVSProject('$NET_DIR/build/net.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion sandbox/src/sandbox_lib.scons
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ env['PCH'] = pch
env['PCHSTOP'] = 'stdafx.h'
env.Append(CCPCHFLAGS = ['/FIstdafx.h'])

env.ChromeStaticLibrary('sandbox', input_files + [obj])
env.ChromeLibrary('sandbox', input_files + [obj])
2 changes: 1 addition & 1 deletion sdch/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ input_files = [
'$OPEN_VCDIFF_DIR/src/vcdiffengine.cc',
]

env.ChromeStaticLibrary('sdch', input_files)
env.ChromeLibrary('sdch', input_files)

env.ChromeMSVSProject('$SDCH_DIR/sdch.vcproj',
guid='{F54ABC59-5C00-414A-A9BA-BAF26D1699F0}')
Expand Down
2 changes: 1 addition & 1 deletion skia/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ if env.Bit('windows'):
env_p['PCH'] = pch
input_files.Replace('precompiled.cc', obj)

env.ChromeStaticLibrary('skia', input_files)
env.ChromeLibrary('skia', input_files)

p = env.ChromeMSVSProject('skia.vcproj',
guid='{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}',
Expand Down
2 changes: 1 addition & 1 deletion testing/SConscript.gtest
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ input_files = ChromeFileList([
'multiprocess_func_list.cc',
])

env.ChromeStaticLibrary('gtest', input_files)
env.ChromeLibrary('gtest', input_files)

p = env.ChromeMSVSProject('gtest.vcproj',
guid='{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}',
Expand Down
2 changes: 1 addition & 1 deletion third_party/bspatch/bspatch.scons
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ input_files = [
'mbspatch.cc',
]

env.ChromeStaticLibrary('bspatch', input_files)
env.ChromeLibrary('bspatch', input_files)

env.ChromeMSVSProject('$BSPATCH_DIR/bspatch.vcproj',
guid='{D7ED06E8-6138-4CE3-A906-5EF1D9C804E0}')
2 changes: 1 addition & 1 deletion third_party/bzip2/bzip2.scons
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ input_files = [
'randtable.c',
]

env.ChromeStaticLibrary('bzip2', input_files)
env.ChromeLibrary('bzip2', input_files)

env.ChromeMSVSProject('$BZIP2_DIR/bzip2.vcproj',
guid='{2A70CBF0-847E-4E3A-B926-542A656DC7FE}')
2 changes: 1 addition & 1 deletion third_party/libevent/libevent.scons
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ if env.Bit('mac'):
])


env.ChromeStaticLibrary('event', input_files)
env.ChromeLibrary('event', input_files)
2 changes: 1 addition & 1 deletion third_party/libjpeg/libjpeg.scons
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ input_files = [
'jutils.c',
]

env.ChromeStaticLibrary('libjpeg', input_files)
env.ChromeLibrary('libjpeg', input_files)

env.ChromeMSVSProject('$LIBJPEG_DIR/libjpeg.vcproj',
guid='{238CE175-76CE-4A25-A676-69D115885601}')
2 changes: 1 addition & 1 deletion third_party/libpng/libpng.scons
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ input_files = ChromeFileList([
'pngwutil.c',
])

env.ChromeStaticLibrary('libpng', input_files)
env.ChromeLibrary('libpng', input_files)

p = env.ChromeMSVSProject('libpng.vcproj',
guid='{C564F145-9172-42C3-BFCB-6014CA97DBCD}',
Expand Down
2 changes: 1 addition & 1 deletion third_party/libxml/libxml.scons
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ input_files = [
'xpointer.c',
]

env.ChromeStaticLibrary('libxml', input_files)
env.ChromeLibrary('libxml', input_files)

env.ChromeMSVSProject('$LIBXML_DIR/build/libxml.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion third_party/libxslt/libxslt.scons
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ input_files = [
'libxslt/xsltutils.c',
]

env.ChromeStaticLibrary('libxslt', input_files)
env.ChromeLibrary('libxslt', input_files)

env.ChromeMSVSProject('$LIBXSLT_DIR/build/libxslt.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion third_party/lzma_sdk/lzma_sdk.scons
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ input_files = [
'Compress/Lzma/LzmaDecode.c',
]

env.ChromeStaticLibrary('lzma_sdk', input_files)
env.ChromeLibrary('lzma_sdk', input_files)

env.ChromeMSVSProject('$LZMA_SDK_DIR/7z_C.vcproj',
name='lzma_sdk',
Expand Down
2 changes: 1 addition & 1 deletion third_party/modp_b64/modp_b64.scons
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ input_files = [
'modp_b64.cc',
]

env.ChromeStaticLibrary('modp_b64', input_files)
env.ChromeLibrary('modp_b64', input_files)

env.ChromeMSVSProject('$MODP_B64_DIR/modp_b64.vcproj',
guid='{7100F41F-868D-4E99-80A2-AF8E6574749D}')
2 changes: 1 addition & 1 deletion third_party/sqlite/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ input_files = [
'where.c',
]

env.ChromeStaticLibrary('sqlite', input_files)
env.ChromeLibrary('sqlite', input_files)

env.ChromeMSVSProject('$SQLITE_DIR/sqlite.vcproj',
guid='{6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9}')
Expand Down
2 changes: 1 addition & 1 deletion third_party/zlib/zlib.scons
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ input_files = ChromeFileList([
'zutil.h',
])

env.ChromeStaticLibrary('zlib', input_files)
env.ChromeLibrary('zlib', input_files)

p = env.ChromeMSVSProject('zlib.vcproj',
guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}',
Expand Down
2 changes: 1 addition & 1 deletion webkit/SConscript.javascriptcore_pcre
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ input_files = [
'$PCRE_DIR/pcre_exec.cpp',
]

env.ChromeStaticLibrary('JavaScriptCore_pcre', input_files)
env.ChromeLibrary('JavaScriptCore_pcre', input_files)

env.ChromeMSVSProject('$WEBKIT_DIR/build/JavaScriptCore/JavaScriptCore_pcre.vcproj',
guid='{49909552-0B0C-4C14-8CF6-DB8A2ADE0934}')
2 changes: 1 addition & 1 deletion webkit/SConscript.port
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ else:
'$PORT_DIR/bindings/v8/ScriptController.cpp',
])

env.ChromeStaticLibrary("port", input_files)
env.ChromeLibrary("port", input_files)

env.ChromeMSVSProject('$WEBKIT_DIR/build/port/port.vcproj',
name = 'Port',
Expand Down
2 changes: 1 addition & 1 deletion webkit/activex_shim/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ input_files = [
'web_activex_site.cc',
]

env.ChromeStaticLibrary('activex_shim', input_files)
env.ChromeLibrary('activex_shim', input_files)

env.ChromeMSVSProject('$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion webkit/build/JavaScriptCore/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ elif env.Bit('linux'):
env.ParseConfig('pkg-config --cflags --libs glib-2.0')


env.ChromeStaticLibrary('WTF', wtf_inputs)
env.ChromeLibrary('WTF', wtf_inputs)

env.ChromeMSVSProject('$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
guid='{AA8A5A85-592B-4357-BC60-E0E91E026AF6}')
2 changes: 1 addition & 1 deletion webkit/build/V8Bindings/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ inputs = [
if env.Bit('windows'):
inputs.append('precompiled_v8bindings.cpp')

env.ChromeStaticLibrary('V8Bindings', inputs)
env.ChromeLibrary('V8Bindings', inputs)

env.ChromeMSVSProject('$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion webkit/build/WebCore/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ if env.Bit('windows'):
env.Append(CCPCHFLAGS = ['/FIprecompiled_webkit.h'])
input_files += [obj]

env.ChromeStaticLibrary('WebCore', input_files)
env.ChromeLibrary('WebCore', input_files)

env.ChromeMSVSProject('$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion webkit/default_plugin/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if env.Bit('windows'):
'install_dialog.cc',
])

env.ChromeStaticLibrary('default_plugin', input_files)
env.ChromeLibrary('default_plugin', input_files)

env.ChromeMSVSProject('$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
dependencies = [
Expand Down
Loading

0 comments on commit de2c4cc

Please sign in to comment.