summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/base_lib.scons16
-rw-r--r--base/base_unittests.scons14
-rw-r--r--base/gfx/base_gfx.scons8
-rw-r--r--breakpad/SConscript6
-rw-r--r--build/SConscript.v84
-rw-r--r--build/debug.scons2
-rw-r--r--build/external_code.scons2
-rw-r--r--build/googleurl_lib.scons2
-rw-r--r--build/googleurl_unittests.scons2
-rw-r--r--build/internal/essential.scons6
-rw-r--r--build/internal/release_impl_dom_stats.scons2
-rw-r--r--chrome/SConscript18
-rw-r--r--chrome/browser/browser.scons10
-rw-r--r--chrome/browser/debugger/debugger.scons17
-rw-r--r--chrome/browser/views/SConscript2
-rw-r--r--chrome/chrome.scons2
-rw-r--r--chrome/common/common.scons14
-rw-r--r--chrome/common/ipc_tests.scons6
-rw-r--r--chrome/installer/mini_installer/installer_unittests.scons2
-rw-r--r--chrome/installer/mini_installer/mini_installer.scons10
-rw-r--r--chrome/installer/setup/setup.scons6
-rw-r--r--chrome/plugin/plugin.scons4
-rw-r--r--chrome/renderer/renderer.scons8
-rw-r--r--chrome/test/activex_test_control/activex_test_control.scons2
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.scons2
-rw-r--r--chrome/test/chrome_plugin/test_chrome_plugin.scons4
-rw-r--r--chrome/test/interactive_ui/interactive_ui_tests.scons2
-rw-r--r--chrome/test/memory_test/memory_test.scons2
-rw-r--r--chrome/test/mini_installer_test/mini_installer_test.scons2
-rw-r--r--chrome/test/page_cycler/page_cycler_tests.scons2
-rw-r--r--chrome/test/perf/perftests.scons18
-rw-r--r--chrome/test/plugin/plugin_tests.scons2
-rw-r--r--chrome/test/reliability/reliability_tests.scons2
-rw-r--r--chrome/test/security_tests/security_tests.scons2
-rw-r--r--chrome/test/selenium/selenium_tests.scons2
-rw-r--r--chrome/test/startup/startup_tests.scons2
-rw-r--r--chrome/test/tab_switching/tab_switching_test.scons2
-rw-r--r--chrome/test/ui/ui_tests.scons4
-rw-r--r--chrome/test/unit/unit_tests.scons14
-rw-r--r--chrome/third_party/hunspell/SConscript4
-rw-r--r--chrome/tools/convert_dict/convert_dict.scons2
-rw-r--r--chrome/tools/crash_service/crash_service.scons2
-rw-r--r--chrome/tools/perf/flush_cache/flush_cache.scons2
-rw-r--r--chrome/tools/profiles/generate_profile.scons2
-rw-r--r--chrome/tools/test/image_diff/image_diff.scons2
-rw-r--r--media/media_lib.scons8
-rw-r--r--media/media_unittests.scons2
-rw-r--r--net/crash_cache.scons5
-rw-r--r--net/dump_cache.scons4
-rw-r--r--net/net.scons4
-rw-r--r--net/net_lib.scons12
-rw-r--r--net/net_perftests.scons9
-rw-r--r--net/net_unittests.scons10
-rw-r--r--net/stress_cache.scons6
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.scons2
-rw-r--r--sandbox/src/sandbox_lib.scons2
-rw-r--r--sandbox/tests/common/sandbox_common.scons2
-rw-r--r--sandbox/tests/integration_tests/sbox_integration_tests.scons2
-rw-r--r--sandbox/tests/unit_tests/sbox_unittests.scons2
-rw-r--r--sandbox/tests/validation_tests/sbox_validation_tests.scons2
-rw-r--r--sandbox/wow_helper/wow_helper.scons2
-rw-r--r--sdch/SConscript8
-rw-r--r--skia/SConscript12
-rw-r--r--testing/SConscript.gtest2
-rw-r--r--third_party/bspatch/bspatch.scons4
-rw-r--r--third_party/bzip2/bzip2.scons2
-rw-r--r--third_party/libevent/libevent.scons8
-rw-r--r--third_party/libjpeg/libjpeg.scons4
-rw-r--r--third_party/libpng/libpng.scons2
-rw-r--r--third_party/libxml/libxml.scons8
-rw-r--r--third_party/libxslt/libxslt.scons6
-rw-r--r--third_party/lzma_sdk/lzma_sdk.scons2
-rw-r--r--third_party/sqlite/SConscript2
-rw-r--r--third_party/zlib/zlib.scons2
-rw-r--r--webkit/SConscript12
-rw-r--r--webkit/SConscript.javascriptcore_pcre2
-rw-r--r--webkit/SConscript.port12
-rw-r--r--webkit/build/JavaScriptCore/SConscript6
-rw-r--r--webkit/build/V8Bindings/SConscript4
-rw-r--r--webkit/build/WebCore/SConscript10
-rw-r--r--webkit/build/localized_strings/SConscript4
-rw-r--r--webkit/build/port/SConscript2
-rw-r--r--webkit/default_plugin/SConscript4
-rw-r--r--webkit/glue/SConscript14
-rw-r--r--webkit/glue/plugins/test/SConscript4
-rw-r--r--webkit/tools/npapi_layout_test_plugin/SConscript2
-rw-r--r--webkit/tools/test_shell/SConscript20
87 files changed, 248 insertions, 225 deletions
diff --git a/base/base_lib.scons b/base/base_lib.scons
index 6ba8d6e..16da434 100644
--- a/base/base_lib.scons
+++ b/base/base_lib.scons
@@ -14,7 +14,7 @@ env.ApplySConscript([
'$ICU38_DIR/using_icu38.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/Wp64',
@@ -84,7 +84,7 @@ input_files = [
# Add object files David M Gay's dtoa and g_fmt third party lib. We
# compile these separately so we can disable warnings.
env_dmg_fp = env.Clone()
-if env_dmg_fp['PLATFORM'] == 'win32':
+if env_dmg_fp.Bit('windows'):
env_dmg_fp.Append(
CCFLAGS = [
'/wd4018',
@@ -93,7 +93,7 @@ if env_dmg_fp['PLATFORM'] == 'win32':
'/wd4554',
],
)
-elif env_dmg_fp['PLATFORM'] in ('darwin', 'posix'):
+elif env_dmg_fp.Bit('posix'):
for var in ['CCFLAGS', 'CXXFLAGS']:
if '-Wall' in env_dmg_fp[var]:
env_dmg_fp[var].remove('-Wall')
@@ -104,7 +104,7 @@ input_files.extend([
env_dmg_fp.Object('third_party/dmg_fp/g_fmt.cc'),
])
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
to_be_ported_files = [
@@ -123,7 +123,7 @@ if env['PLATFORM'] in ('posix', 'darwin'):
for remove in to_be_ported_files:
input_files.remove(remove)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'base_drag_source.cc',
'base_drop_target.cc',
@@ -162,7 +162,7 @@ if env['PLATFORM'] == 'win32':
'worker_pool.cc',
])
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
input_files.extend([
'condition_variable_posix.cc',
'debug_util_posix.cc',
@@ -182,7 +182,7 @@ if env['PLATFORM'] in ('darwin', 'posix'):
'waitable_event_generic.cc',
])
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
input_files.extend([
'base_paths_mac.mm',
'clipboard_mac.mm',
@@ -198,7 +198,7 @@ if env['PLATFORM'] == 'darwin':
'worker_pool_mac.mm',
])
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
input_files.extend([
'atomicops_internals_x86_gcc.cc',
'base_paths_linux.cc',
diff --git a/base/base_unittests.scons b/base/base_unittests.scons
index 7aa039a..a606ebb 100644
--- a/base/base_unittests.scons
+++ b/base/base_unittests.scons
@@ -20,12 +20,12 @@ env.ApplySConscript([
'$ZLIB_DIR/using_zlib.scons',
])
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
env.ApplySConscript([
'$LIBEVENT_DIR/using_libevent.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/TP',
@@ -33,7 +33,7 @@ if env['PLATFORM'] == 'win32':
],
)
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
env.Append(
# We need 'Xss' (X Screen Saver) in LIBS if we want idletimer_unittest
LIBS = [
@@ -99,7 +99,7 @@ input_files = [
'gfx/rect_unittest.cc',
]
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
to_be_ported_files = [
@@ -112,7 +112,7 @@ if env['PLATFORM'] in ('posix', 'darwin'):
for remove in to_be_ported_files:
input_files.remove(remove)
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
to_be_ported_files = [
@@ -123,7 +123,7 @@ if env['PLATFORM'] == 'darwin':
input_files.remove(remove)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# Windows-specific tests.
input_files.extend([
'directory_watcher_unittest.cc',
@@ -136,7 +136,7 @@ if env['PLATFORM'] == 'win32':
'wmi_util_unittest.cc',
])
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
# Mac-specific tests.
input_files.extend([
'mac_util_unittest.cc',
diff --git a/base/gfx/base_gfx.scons b/base/gfx/base_gfx.scons
index a69206b..2dc9dc9 100644
--- a/base/gfx/base_gfx.scons
+++ b/base/gfx/base_gfx.scons
@@ -17,7 +17,7 @@ env.ApplySConscript([
'$ZLIB_DIR/using_zlib.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/WX',
@@ -34,7 +34,7 @@ input_files = [
'size.cc',
]
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
to_be_ported_files = [
@@ -44,10 +44,10 @@ if env['PLATFORM'] in ('posix', 'darwin'):
for remove in to_be_ported_files:
input_files.remove(remove)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
])
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
input_files.extend([
])
diff --git a/breakpad/SConscript b/breakpad/SConscript
index 0a8f771..6fc4849 100644
--- a/breakpad/SConscript
+++ b/breakpad/SConscript
@@ -13,7 +13,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
@@ -29,7 +29,7 @@ if env['PLATFORM'] == 'win32':
env.ChromeStaticLibrary('breakpad_sender', sender_input_files)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
handler_input_files = [
'src/client/windows/crash_generation/client_info.cc',
'src/client/windows/crash_generation/minidump_generator.cc',
@@ -38,7 +38,7 @@ if env['PLATFORM'] == 'win32':
'src/client/windows/crash_generation/crash_generation_server.cc',
'src/client/windows/crash_generation/crash_generation_client.cc',
]
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
handler_input_files = [
'src/common/linux/guid_creator.cc',
'src/client/linux/handler/exception_handler.cc',
diff --git a/build/SConscript.v8 b/build/SConscript.v8
index c22fb57..49c2085 100644
--- a/build/SConscript.v8
+++ b/build/SConscript.v8
@@ -56,7 +56,7 @@ v8_scons_targets_on = [
'$V8_MODE_DIR/snapshot${OBJSUFFIX}',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
v8_scons_targets_off.extend([
env.File('$V8_DIR/vc80.pdb')
])
@@ -79,7 +79,7 @@ env.Install('$LIBS_DIR', v8[1])
env.Install('$V8_DIR', '$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}')
# To satisfy tests expecting the following .exe name.
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(evanm): this may be necessary on other platforms(?)
i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8[0])
diff --git a/build/debug.scons b/build/debug.scons
index 4cf6bf8..3b0011a 100644
--- a/build/debug.scons
+++ b/build/debug.scons
@@ -21,7 +21,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
if env.get('INCREMENTAL') is None:
# INCREMENTAL was not specified on the command line or in the
# external environment; debug default is incremental link.
diff --git a/build/external_code.scons b/build/external_code.scons
index 45c039f..04ee866 100644
--- a/build/external_code.scons
+++ b/build/external_code.scons
@@ -8,7 +8,7 @@ External code settings for Chromium builds.
Import("env")
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CPPDEFINES = [
'_CRT_SECURE_NO_DEPRECATE',
diff --git a/build/googleurl_lib.scons b/build/googleurl_lib.scons
index 6738fea..4d8b6d3 100644
--- a/build/googleurl_lib.scons
+++ b/build/googleurl_lib.scons
@@ -20,7 +20,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
diff --git a/build/googleurl_unittests.scons b/build/googleurl_unittests.scons
index 851f85a..7cdb6f3 100644
--- a/build/googleurl_unittests.scons
+++ b/build/googleurl_unittests.scons
@@ -23,7 +23,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
diff --git a/build/internal/essential.scons b/build/internal/essential.scons
index bca07f2..547f73a 100644
--- a/build/internal/essential.scons
+++ b/build/internal/essential.scons
@@ -21,7 +21,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
incremental = env.get('INCREMENTAL')
if incremental is not None:
if incremental:
@@ -110,7 +110,7 @@ if env['PLATFORM'] == 'win32':
'/EH', # VCCLCompilerTool.ExceptionHandling="0"
],
)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
pass
-elif env['PLATFORM'] == 'mac':
+elif env.Bit('mac'):
pass
diff --git a/build/internal/release_impl_dom_stats.scons b/build/internal/release_impl_dom_stats.scons
index ec55585..9dae238 100644
--- a/build/internal/release_impl_dom_stats.scons
+++ b/build/internal/release_impl_dom_stats.scons
@@ -17,7 +17,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Replace(
CHROMIUM_LINK_OPT_FLAGS = [
'/OPT:REF', # VCLinkerTool.OptimizeReferences="2"
diff --git a/chrome/SConscript b/chrome/SConscript
index 4942449..b9bbb33 100644
--- a/chrome/SConscript
+++ b/chrome/SConscript
@@ -23,7 +23,7 @@ env.Prepend(
# TODO(port)
-if env_res['PLATFORM'] == 'win32':
+if env_res.Bit('windows'):
env_res.Append(
CPPPATH = [
'.',
@@ -139,7 +139,7 @@ env_dll.Append(
],
)
-if env_dll['PLATFORM'] == 'win32':
+if env_dll.Bit('windows'):
env_dll.Append(
LIBS = [
# TODO(sgk): to be ported to Mac and Linux
@@ -190,7 +190,7 @@ if env_dll['PLATFORM'] == 'win32':
input_files = []
-if env_dll['PLATFORM'] == 'win32':
+if env_dll.Bit('windows'):
input_files.extend([
'app/chrome_dll_main.cc',
'$V8_DIR/snapshot-empty$OBJSUFFIX',
@@ -226,7 +226,7 @@ grit_files.extend(google_chrome)
# TODO(port)
-if env_dll['PLATFORM'] == 'win32':
+if env_dll.Bit('windows'):
dll_targets = env_dll.ChromeSharedLibrary('chrome_dll/chrome',
dll_resources + input_files,
PDB='chrome_dll.pdb')
@@ -300,7 +300,7 @@ env_exe.Append(
)
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
chrome_exe = env_exe.ChromeProgram(
'chrome_exe/chrome',
[
@@ -366,7 +366,7 @@ flats = [
]
# TODO(port)
-if env_flat['PLATFORM'] == 'win32':
+if env_flat.Bit('windows'):
flats_out = []
for i in flats:
flats_out.extend(env_flat.FlatHtml(i))
@@ -383,7 +383,7 @@ if not env.WantSystemLib('sqlite'):
sconscript_files.append('$THIRD_PARTY_DIR/sqlite/SConscript')
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
sconscript_files.extend([
'app/resources/SConscript',
'app/theme/SConscript',
@@ -394,7 +394,7 @@ if env['PLATFORM'] == 'win32':
env.SConscript(sconscript_files, exports=['env', 'env_res', 'env_test'])
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.InstallAs('$LIBS_DIR/${LIBPREFIX}jscre${LIBSUFFIX}',
'$WEBKIT_DIR/JavaScriptCore_pcre.lib')
@@ -408,7 +408,7 @@ gears_plugins = [
]
# TODO(port)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Install('$DESTINATION_ROOT/plugins/gears', gears_plugins)
env.Command('$DESTINATION_ROOT/resources/inspector',
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 840013f..587da3c 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -30,7 +30,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
@@ -39,7 +39,7 @@ if env['PLATFORM'] == 'win32':
input_files = []
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
# TODO: Port to Mac.
input_files.extend([
'autocomplete/keyword_provider.cc',
@@ -117,7 +117,7 @@ if env['PLATFORM'] in ('posix', 'win32'):
'webdata/web_database.cc',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO: Port these.
input_files.extend([
'autofill_manager.cc',
@@ -300,11 +300,11 @@ if env['PLATFORM'] == 'win32':
'web_contents_view_win.cc',
])
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
input_files.extend([
'importer/firefox_profile_lock_posix.cc',
])
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
# TODO: This should work for all platforms.
env.ChromeStaticLibrary('browser', input_files)
diff --git a/chrome/browser/debugger/debugger.scons b/chrome/browser/debugger/debugger.scons
index 7dce9b4..2846f89 100644
--- a/chrome/browser/debugger/debugger.scons
+++ b/chrome/browser/debugger/debugger.scons
@@ -36,7 +36,7 @@ input_files = [
'debugger_wrapper.cc',
]
-if env['PLATFORM'] != 'win32':
+if env.Bit('linux'):
# TODO(port): Port these.
remove_list = [
'debugger_contents.cc',
@@ -49,7 +49,20 @@ if env['PLATFORM'] != 'win32':
for file in remove_list:
input_files.remove(file)
-if env['PLATFORM'] in ('posix', 'win32'):
+if env.Bit('mac'):
+ # TODO(port): Port these.
+ remove_list = [
+ 'debugger_contents.cc',
+ 'debugger_host_impl.cpp',
+ 'debugger_node.cc',
+ 'debugger_shell.cc',
+ 'debugger_view.cc',
+ 'debugger_window.cc',
+ ]
+ for file in remove_list:
+ input_files.remove(file)
+
+if not env.Bit('mac'):
# TODO(port): Enable for Mac.
env.ChromeStaticLibrary('debugger', input_files)
diff --git a/chrome/browser/views/SConscript b/chrome/browser/views/SConscript
index a0dcb2d..4c0e9c4 100644
--- a/chrome/browser/views/SConscript
+++ b/chrome/browser/views/SConscript
@@ -132,7 +132,7 @@ input_files = [
'user_data_dir_dialog.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'find_bar_win.cc',
])
diff --git a/chrome/chrome.scons b/chrome/chrome.scons
index f21de10..1081fc2 100644
--- a/chrome/chrome.scons
+++ b/chrome/chrome.scons
@@ -79,7 +79,7 @@ sconscript_files = env.ChromiumLoadComponentSConscripts(
)
# TODO(port)
-if env['PLATFORM'] != 'win32':
+if env.AnyBits('linux', 'mac'):
remove_files = [
'installer/mini_installer/installer_unittests.scons',
'installer/mini_installer/mini_installer.scons',
diff --git a/chrome/common/common.scons b/chrome/common/common.scons
index 371d2df4..5b82155 100644
--- a/chrome/common/common.scons
+++ b/chrome/common/common.scons
@@ -32,7 +32,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
@@ -41,7 +41,7 @@ if env['PLATFORM'] == 'win32':
input_files = []
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
# TODO(port): Port to Mac.
input_files.extend([
'animation.cc',
@@ -77,7 +77,7 @@ if env['PLATFORM'] in ('posix', 'win32'):
'visitedlink_common.cc',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): Port these.
input_files.extend([
'child_process.cc',
@@ -111,24 +111,24 @@ if env['PLATFORM'] == 'win32':
'worker_thread_ticker.cc',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# Windows specific files
input_files.extend([
'gfx/chrome_font_win.cc',
'ipc_channel_win.cc',
])
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
input_files.extend([
'gfx/chrome_canvas_skia.cc',
'gfx/chrome_font_skia.cc',
])
-if env['PLATFORM'] in ['posix', 'mac']:
+if env.Bit('posix'):
input_files.extend([
'ipc_channel_posix.cc',
])
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
# TODO(port): This should be enabled for all platforms.
env.ChromeStaticLibrary('common', input_files)
diff --git a/chrome/common/ipc_tests.scons b/chrome/common/ipc_tests.scons
index d4d534d..27d8f8e 100644
--- a/chrome/common/ipc_tests.scons
+++ b/chrome/common/ipc_tests.scons
@@ -20,7 +20,7 @@ env.SConscript([
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
@@ -43,14 +43,14 @@ env.Prepend(
]
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/installer/mini_installer/installer_unittests.scons b/chrome/installer/mini_installer/installer_unittests.scons
index 13119b9..9dd31f2 100644
--- a/chrome/installer/mini_installer/installer_unittests.scons
+++ b/chrome/installer/mini_installer/installer_unittests.scons
@@ -22,7 +22,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.FilterOut(
LIBS = ['DelayImp.lib'],
)
diff --git a/chrome/installer/mini_installer/mini_installer.scons b/chrome/installer/mini_installer/mini_installer.scons
index f9d0dd2..89c0d62 100644
--- a/chrome/installer/mini_installer/mini_installer.scons
+++ b/chrome/installer/mini_installer/mini_installer.scons
@@ -12,11 +12,11 @@ env.ApplySConscript([
# TODO(port): Don't be too fooled by the presence of all the
-# if env['PLATFORM'] == 'win32' tests in this file into thinking
+# if env.Bit('windows') tests in this file into thinking
# this is necessarily portable. They're just there to wall off the
# obviously windows-specific things
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env_res = env.Clone()
env_res.Append(
@@ -42,7 +42,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.FilterOut(
LIBS = ['DelayImp.lib'],
CCFLAGS = ['/RTC1'],
@@ -80,7 +80,7 @@ input_files = [
"pe_resource.cc",
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
"$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj",
"$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj",
@@ -109,6 +109,6 @@ exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc',
'mini_installer_exe_version.rc.version',
PWD=Dir('.'))
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(sgk): implicit dependency should be picked up automatically
env_res.Depends(resources, exe_version_rc)
diff --git a/chrome/installer/setup/setup.scons b/chrome/installer/setup/setup.scons
index 1a73359..b0ef23b 100644
--- a/chrome/installer/setup/setup.scons
+++ b/chrome/installer/setup/setup.scons
@@ -13,7 +13,7 @@ env.ApplySConscript([
'$LZMA_SDK_DIR/using_lzma_sdk.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env_res = env.Clone()
env_res.Append(
@@ -46,7 +46,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
@@ -87,6 +87,6 @@ exe_version_rc = env.ChromeVersionRC('setup_exe_version.rc',
'setup_exe_version.rc.version',
PWD = env.Dir('.'))
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(sgk): implicit dependency should be picked up automatically
env_res.Depends(resources, exe_version_rc)
diff --git a/chrome/plugin/plugin.scons b/chrome/plugin/plugin.scons
index 1a54366..c26768a 100644
--- a/chrome/plugin/plugin.scons
+++ b/chrome/plugin/plugin.scons
@@ -17,7 +17,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
@@ -38,7 +38,7 @@ input_files = [
'webplugin_proxy.cc',
]
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# TODO(port)
to_be_ported_files = [
'chrome_plugin_host.cc',
diff --git a/chrome/renderer/renderer.scons b/chrome/renderer/renderer.scons
index 50161ac..279b143 100644
--- a/chrome/renderer/renderer.scons
+++ b/chrome/renderer/renderer.scons
@@ -20,7 +20,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
@@ -53,7 +53,7 @@ input_files = [
]
# TODO(port): Port these to Linux
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
to_be_ported_files = [
'chrome_plugin_host.cc',
'debug_message_handler.cc',
@@ -72,7 +72,7 @@ if env['PLATFORM'] == 'posix':
input_files.remove(remove)
# TODO(port): Port these to Mac
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
to_be_ported_files = [
'about_handler.cc',
'chrome_plugin_host.cc',
@@ -100,5 +100,5 @@ if env['PLATFORM'] == 'darwin':
# TODO(port): Enable for Mac.
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
env.ChromeStaticLibrary('renderer', input_files)
diff --git a/chrome/test/activex_test_control/activex_test_control.scons b/chrome/test/activex_test_control/activex_test_control.scons
index 39beb08..a971b48 100644
--- a/chrome/test/activex_test_control/activex_test_control.scons
+++ b/chrome/test/activex_test_control/activex_test_control.scons
@@ -13,7 +13,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.scons b/chrome/test/automated_ui_tests/automated_ui_tests.scons
index 93d1774..a483ab9 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.scons
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.scons
@@ -33,7 +33,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
diff --git a/chrome/test/chrome_plugin/test_chrome_plugin.scons b/chrome/test/chrome_plugin/test_chrome_plugin.scons
index e2934cd..e7d3661 100644
--- a/chrome/test/chrome_plugin/test_chrome_plugin.scons
+++ b/chrome/test/chrome_plugin/test_chrome_plugin.scons
@@ -18,7 +18,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
@@ -45,7 +45,7 @@ input_files = [
'test_chrome_plugin.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'test_chrome_plugin.def',
])
diff --git a/chrome/test/interactive_ui/interactive_ui_tests.scons b/chrome/test/interactive_ui/interactive_ui_tests.scons
index eda7f26..fe92cf0 100644
--- a/chrome/test/interactive_ui/interactive_ui_tests.scons
+++ b/chrome/test/interactive_ui/interactive_ui_tests.scons
@@ -62,7 +62,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/memory_test/memory_test.scons b/chrome/test/memory_test/memory_test.scons
index af86998..84871c9 100644
--- a/chrome/test/memory_test/memory_test.scons
+++ b/chrome/test/memory_test/memory_test.scons
@@ -35,7 +35,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/mini_installer_test/mini_installer_test.scons b/chrome/test/mini_installer_test/mini_installer_test.scons
index 32da07b..7014079 100644
--- a/chrome/test/mini_installer_test/mini_installer_test.scons
+++ b/chrome/test/mini_installer_test/mini_installer_test.scons
@@ -32,7 +32,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/page_cycler/page_cycler_tests.scons b/chrome/test/page_cycler/page_cycler_tests.scons
index dfb8cb8..46e35fc 100644
--- a/chrome/test/page_cycler/page_cycler_tests.scons
+++ b/chrome/test/page_cycler/page_cycler_tests.scons
@@ -34,7 +34,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/perf/perftests.scons b/chrome/test/perf/perftests.scons
index c089027..97e57d3 100644
--- a/chrome/test/perf/perftests.scons
+++ b/chrome/test/perf/perftests.scons
@@ -30,7 +30,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
@@ -45,7 +45,7 @@ input_files = [
'$CHROME_DIR/common/json_value_serializer_perftest.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LIBS = [
'rpcrt4',
@@ -54,7 +54,7 @@ if env['PLATFORM'] == 'win32':
]
)
-if env['PLATFORM'] != 'win32':
+if env.Bit('linux'):
# TODO(port): Port these files.
remove_files = [
'url_parse_perftest.cc',
@@ -64,5 +64,15 @@ if env['PLATFORM'] != 'win32':
for file in remove_files:
input_files.remove(file)
-if env['PLATFORM'] in ('posix', 'win32'):
+if env.Bit('mac'):
+ # TODO(port): Port these files.
+ remove_files = [
+ 'url_parse_perftest.cc',
+ '$CHROME_DIR/browser/visitedlink_master$OBJSUFFIX',
+ '$CHROME_DIR/browser/visitedlink_perftest.cc',
+ ]
+ for file in remove_files:
+ input_files.remove(file)
+
+if not env.Bit('mac'):
env.ChromeTestProgram('perf_tests', input_files)
diff --git a/chrome/test/plugin/plugin_tests.scons b/chrome/test/plugin/plugin_tests.scons
index da7e348..fb0508b 100644
--- a/chrome/test/plugin/plugin_tests.scons
+++ b/chrome/test/plugin/plugin_tests.scons
@@ -37,7 +37,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/reliability/reliability_tests.scons b/chrome/test/reliability/reliability_tests.scons
index 4b14f6d..8f6ad5f 100644
--- a/chrome/test/reliability/reliability_tests.scons
+++ b/chrome/test/reliability/reliability_tests.scons
@@ -36,7 +36,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/security_tests/security_tests.scons b/chrome/test/security_tests/security_tests.scons
index a3a9c3a..2fdf83f 100644
--- a/chrome/test/security_tests/security_tests.scons
+++ b/chrome/test/security_tests/security_tests.scons
@@ -12,7 +12,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/selenium/selenium_tests.scons b/chrome/test/selenium/selenium_tests.scons
index b359940..8d98dd1 100644
--- a/chrome/test/selenium/selenium_tests.scons
+++ b/chrome/test/selenium/selenium_tests.scons
@@ -40,7 +40,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/startup/startup_tests.scons b/chrome/test/startup/startup_tests.scons
index f857656..5ff685e 100644
--- a/chrome/test/startup/startup_tests.scons
+++ b/chrome/test/startup/startup_tests.scons
@@ -34,7 +34,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/tab_switching/tab_switching_test.scons b/chrome/test/tab_switching/tab_switching_test.scons
index d1932db..f4e63e9 100644
--- a/chrome/test/tab_switching/tab_switching_test.scons
+++ b/chrome/test/tab_switching/tab_switching_test.scons
@@ -34,7 +34,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/test/ui/ui_tests.scons b/chrome/test/ui/ui_tests.scons
index 202ce96..53113482 100644
--- a/chrome/test/ui/ui_tests.scons
+++ b/chrome/test/ui/ui_tests.scons
@@ -45,7 +45,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
@@ -123,7 +123,7 @@ ui_test_files = [
'$NET_DIR/url_request/url_request_test_job$OBJSUFFIX',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
ui_test_files.extend([
'$CHROME_DIR/browser/views/find_bar_win_interactive_uitest.cc',
'$CHROME_DIR/browser/views/find_bar_win_uitest.cc',
diff --git a/chrome/test/unit/unit_tests.scons b/chrome/test/unit/unit_tests.scons
index 3848d30..3c25fb7 100644
--- a/chrome/test/unit/unit_tests.scons
+++ b/chrome/test/unit/unit_tests.scons
@@ -26,12 +26,12 @@ env.SConscript([
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.SConscript([
'$SDCH_DIR/using_sdch.scons',
], {'env':env})
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
@@ -60,14 +60,14 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_DIR/tools/build/win',
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): Port or mark as Windows-specific.
env.Prepend(
LIBS = [
@@ -109,7 +109,7 @@ if env['PLATFORM'] == 'win32':
unit_test_files = []
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
# TODO(port): Port to Mac.
unit_test_files.extend([
'run_all_unittests.cc',
@@ -143,7 +143,7 @@ if env['PLATFORM'] in ('posix', 'win32'):
'$CHROME_DIR/renderer/greasemonkey_slave_unittest.cc',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): Port these.
unit_test_files.extend([
'$CHROME_DIR/browser/autocomplete/autocomplete_unittest.cc',
@@ -244,7 +244,7 @@ if env['PLATFORM'] == 'win32':
'$CHROME_DIR/test/data/resource.res',
])
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
# TODO(port): This should work on all platforms.
unit_tests = env.ChromeTestProgram('unit_tests', unit_test_files)
diff --git a/chrome/third_party/hunspell/SConscript b/chrome/third_party/hunspell/SConscript
index 5c76531..8941451 100644
--- a/chrome/third_party/hunspell/SConscript
+++ b/chrome/third_party/hunspell/SConscript
@@ -48,7 +48,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CPPDEFINES = [
'W32',
@@ -60,7 +60,7 @@ if env['PLATFORM'] == 'win32':
],
)
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
env.Append(
CCFLAGS = [
'-Wno-parentheses',
diff --git a/chrome/tools/convert_dict/convert_dict.scons b/chrome/tools/convert_dict/convert_dict.scons
index b634294b..bec1668 100644
--- a/chrome/tools/convert_dict/convert_dict.scons
+++ b/chrome/tools/convert_dict/convert_dict.scons
@@ -15,7 +15,7 @@ env.ApplySConscript([
# '$ZLIB_DIR/using_zlib.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LIBS = [
#'breakpad_handler',
diff --git a/chrome/tools/crash_service/crash_service.scons b/chrome/tools/crash_service/crash_service.scons
index db59307..b106369 100644
--- a/chrome/tools/crash_service/crash_service.scons
+++ b/chrome/tools/crash_service/crash_service.scons
@@ -15,7 +15,7 @@ env.ApplySConscript([
'$ZLIB_DIR/using_zlib.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
diff --git a/chrome/tools/perf/flush_cache/flush_cache.scons b/chrome/tools/perf/flush_cache/flush_cache.scons
index cbd174d..88c6ee6 100644
--- a/chrome/tools/perf/flush_cache/flush_cache.scons
+++ b/chrome/tools/perf/flush_cache/flush_cache.scons
@@ -17,7 +17,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/chrome/tools/profiles/generate_profile.scons b/chrome/tools/profiles/generate_profile.scons
index 9e601ea..533dc48 100644
--- a/chrome/tools/profiles/generate_profile.scons
+++ b/chrome/tools/profiles/generate_profile.scons
@@ -52,7 +52,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LIBS = [
'rpcrt4',
diff --git a/chrome/tools/test/image_diff/image_diff.scons b/chrome/tools/test/image_diff/image_diff.scons
index 540d7a1..7451bfe 100644
--- a/chrome/tools/test/image_diff/image_diff.scons
+++ b/chrome/tools/test/image_diff/image_diff.scons
@@ -21,7 +21,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
LINKFLAGS = [
'/INCREMENTAL',
diff --git a/media/media_lib.scons b/media/media_lib.scons
index cfb108c..a5d26dd 100644
--- a/media/media_lib.scons
+++ b/media/media_lib.scons
@@ -29,19 +29,19 @@ input_files = [
'base/media_format.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
])
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
input_files.extend([
])
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
input_files.extend([
])
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
input_files.extend([
])
diff --git a/media/media_unittests.scons b/media/media_unittests.scons
index f7c1ba4..22b1ecf 100644
--- a/media/media_unittests.scons
+++ b/media/media_unittests.scons
@@ -23,7 +23,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/TP',
diff --git a/net/crash_cache.scons b/net/crash_cache.scons
index e4ec1d9..496f7b0 100644
--- a/net/crash_cache.scons
+++ b/net/crash_cache.scons
@@ -17,7 +17,7 @@ env.ApplySConscript([
'$NET_DIR/using_net.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/WX',
@@ -30,6 +30,5 @@ input_files = [
]
-if env['PLATFORM'] in ('posix', 'win32'):
-
+if not env.Bit('mac'):
env.ChromeTestProgram('crash_cache', input_files)
diff --git a/net/dump_cache.scons b/net/dump_cache.scons
index 37099e5..efbfbd5 100644
--- a/net/dump_cache.scons
+++ b/net/dump_cache.scons
@@ -16,7 +16,7 @@ env.ApplySConscript([
'$NET_DIR/using_net.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/WX',
@@ -30,6 +30,6 @@ input_files = [
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.ChromeTestProgram('dump_cache', input_files)
diff --git a/net/net.scons b/net/net.scons
index cc22d36..7f5f115b 100644
--- a/net/net.scons
+++ b/net/net.scons
@@ -23,7 +23,7 @@ sconscript_files = [
'stress_cache.scons',
]
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# Remove *.scons files whose targets still need to be ported.
# TODO(port): delete files from this list as they get ported.
to_be_ported = [
@@ -32,7 +32,7 @@ if env['PLATFORM'] in ('posix', 'darwin'):
for remove in to_be_ported:
sconscript_files.remove(remove)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO: We need to port tld_cleanup before this will work on other
# platforms.
sconscript_files.extend([
diff --git a/net/net_lib.scons b/net/net_lib.scons
index 4f96264..0cd3a15 100644
--- a/net/net_lib.scons
+++ b/net/net_lib.scons
@@ -102,7 +102,7 @@ input_files = [
'url_request/url_request_view_cache_job.cc',
]
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
to_be_ported_files = [
@@ -114,7 +114,7 @@ if env['PLATFORM'] in ('posix', 'darwin'):
for remove in to_be_ported_files:
input_files.remove(remove)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'base/file_stream_win.cc',
'base/net_util_win.cc',
@@ -131,7 +131,7 @@ if env['PLATFORM'] == 'win32':
'url_request/url_request_inet_job.cc',
])
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
input_files.extend([
'base/platform_mime_util_mac.cc',
'base/ssl_client_socket_mac.cc',
@@ -139,7 +139,7 @@ if env['PLATFORM'] == 'darwin':
'proxy/proxy_resolver_mac.cc',
])
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
input_files.extend([
'base/nss_memio.c',
# TODO(tc): gnome-vfs? xdgmime? /etc/mime.types?
@@ -148,7 +148,7 @@ if env['PLATFORM'] == 'posix':
'base/x509_certificate_nss.cc',
])
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
input_files.extend([
'base/file_stream_posix.cc',
'base/net_util_posix.cc',
@@ -158,7 +158,7 @@ if env['PLATFORM'] in ('darwin', 'posix'):
'disk_cache/mapped_file_posix.cc',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag
# possibly only on incredibuild, scons doesn't know this.
env_p = env.Clone()
diff --git a/net/net_perftests.scons b/net/net_perftests.scons
index 6c62c99..667090e 100644
--- a/net/net_perftests.scons
+++ b/net/net_perftests.scons
@@ -19,18 +19,18 @@ env.ApplySConscript([
'$NET_DIR/using_net.scons',
])
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/WX',
],
)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
env.Append(
# TODO(port): disk_cache_perftest breaks strict aliasing rules.
CCFLAGS = ['-fno-strict-aliasing'],
@@ -46,6 +46,5 @@ input_files = [
'$OBJ_ROOT/base/perftimer$OBJSUFFIX',
]
-if env['PLATFORM'] in ('posix', 'win32'):
-
+if not env.Bit('mac'):
env.ChromeTestProgram('net_perftests', input_files)
diff --git a/net/net_unittests.scons b/net/net_unittests.scons
index 713505c..f3457be 100644
--- a/net/net_unittests.scons
+++ b/net/net_unittests.scons
@@ -22,12 +22,12 @@ env.ApplySConscript([
'$ZLIB_DIR/using_zlib.scons',
])
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/WX',
@@ -85,14 +85,14 @@ input_files = [
'url_request/url_request_unittest.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'base/wininet_util_unittest.cc',
'http/http_transaction_winhttp_unittest.cc',
'http/winhttp_request_throttle_unittest.cc',
])
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
# TODO(port):
to_be_ported_files = [
'base/x509_certificate_unittest.cc',
@@ -101,7 +101,7 @@ if env['PLATFORM'] == 'posix':
]
input_files = list(set(input_files) - set(to_be_ported_files))
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
input_files.extend([
'../base/platform_test_mac$OBJSUFFIX',
])
diff --git a/net/stress_cache.scons b/net/stress_cache.scons
index e7dfedf..c4278c9 100644
--- a/net/stress_cache.scons
+++ b/net/stress_cache.scons
@@ -17,7 +17,7 @@ env.ApplySConscript([
'$NET_DIR/using_net.scons',
])
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
env.ApplySConscript(['$THIRD_PARTY_DIR/libevent/using_libevent.scons'])
env.Prepend(
@@ -26,7 +26,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/WX',
@@ -38,5 +38,5 @@ input_files = [
'disk_cache/stress_cache.cc',
]
-if env['PLATFORM'] in ('posix', 'win32'):
+if not env.Bit('mac'):
env.ChromeTestProgram('stress_cache', input_files)
diff --git a/net/tools/tld_cleanup/tld_cleanup.scons b/net/tools/tld_cleanup/tld_cleanup.scons
index 6b579f0..de9b0a0 100644
--- a/net/tools/tld_cleanup/tld_cleanup.scons
+++ b/net/tools/tld_cleanup/tld_cleanup.scons
@@ -17,7 +17,7 @@ env.ApplySConscript([
'$NET_DIR/using_net.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
LINKFLAGS = [
'/SUBSYSTEM:CONSOLE',
diff --git a/sandbox/src/sandbox_lib.scons b/sandbox/src/sandbox_lib.scons
index 493f3be..0189114 100644
--- a/sandbox/src/sandbox_lib.scons
+++ b/sandbox/src/sandbox_lib.scons
@@ -10,7 +10,7 @@ env.ApplySConscript([
'$GTEST_DIR/../using_gtest.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/WX', # treat warnings as errors
diff --git a/sandbox/tests/common/sandbox_common.scons b/sandbox/tests/common/sandbox_common.scons
index b1b101c..6b50ba4 100644
--- a/sandbox/tests/common/sandbox_common.scons
+++ b/sandbox/tests/common/sandbox_common.scons
@@ -6,7 +6,7 @@ Import('env')
env = env.Clone()
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/WX', # treat warnings as errors
diff --git a/sandbox/tests/integration_tests/sbox_integration_tests.scons b/sandbox/tests/integration_tests/sbox_integration_tests.scons
index 7c8ed97..71e927d 100644
--- a/sandbox/tests/integration_tests/sbox_integration_tests.scons
+++ b/sandbox/tests/integration_tests/sbox_integration_tests.scons
@@ -12,7 +12,7 @@ env.ApplySConscript([
'$SANDBOX_DIR/using_sandbox.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/WX', # treat warnings as errors
diff --git a/sandbox/tests/unit_tests/sbox_unittests.scons b/sandbox/tests/unit_tests/sbox_unittests.scons
index 02fc1b8..660a13a 100644
--- a/sandbox/tests/unit_tests/sbox_unittests.scons
+++ b/sandbox/tests/unit_tests/sbox_unittests.scons
@@ -12,7 +12,7 @@ env.ApplySConscript([
'$SANDBOX_DIR/using_sandbox.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/WX', # treat warnings as errors
diff --git a/sandbox/tests/validation_tests/sbox_validation_tests.scons b/sandbox/tests/validation_tests/sbox_validation_tests.scons
index ba4dcae..e23a3c7 100644
--- a/sandbox/tests/validation_tests/sbox_validation_tests.scons
+++ b/sandbox/tests/validation_tests/sbox_validation_tests.scons
@@ -12,7 +12,7 @@ env.ApplySConscript([
'$SANDBOX_DIR/using_sandbox.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/WX', # treat warnings as errors
diff --git a/sandbox/wow_helper/wow_helper.scons b/sandbox/wow_helper/wow_helper.scons
index 532cb9a..2430aeb 100644
--- a/sandbox/wow_helper/wow_helper.scons
+++ b/sandbox/wow_helper/wow_helper.scons
@@ -6,7 +6,7 @@ Import('env')
env = env.Clone()
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# NOTE: env.Replace() instead of inhering the normal *.scons settings!
env.Replace(
diff --git a/sdch/SConscript b/sdch/SConscript
index dbb0e55..e931984 100644
--- a/sdch/SConscript
+++ b/sdch/SConscript
@@ -12,7 +12,7 @@ cpppath = [
'$OPEN_VCDIFF_DIR/src',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
cpppath.append('$OPEN_VCDIFF_DIR/vsprojects')
env.Prepend(CPPPATH = cpppath)
@@ -33,7 +33,7 @@ input_files = [
env.ChromeStaticLibrary('sdch', input_files)
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
# Generate a target config.h file from a source config.h.in file.
#
@@ -73,14 +73,14 @@ if env['PLATFORM'] in ('posix', 'darwin'):
'STDC_HEADERS',
]
- if env['PLATFORM'] == 'posix':
+ if env.Bit('linux'):
defines.extend([
'HAVE_MALLOC_H',
'HAVE_MEMALIGN',
'HAVE_POSIX_MEMALIGN',
])
- if env['PLATFORM'] == 'darwin':
+ if env.Bit('mac'):
defines.extend([
'HAVE_WORKING_KQUEUE',
])
diff --git a/skia/SConscript b/skia/SConscript
index 22a3e3d..b09299d 100644
--- a/skia/SConscript
+++ b/skia/SConscript
@@ -23,7 +23,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
@@ -36,7 +36,7 @@ if env['PLATFORM'] == 'win32':
'/wd4800',
],
)
-elif env['PLATFORM'] in ('posix', 'darwin'):
+elif env.Bit('posix'):
env.Append(CCFLAGS = ['-Wno-unused'])
input_files = [
@@ -159,7 +159,7 @@ input_files = [
'sgl/SkXfermode.cpp',
]
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
input_files.append('ext/bitmap_platform_device_linux.cc')
input_files.append('ext/platform_canvas_linux.cc')
input_files.append('ext/platform_device_linux.cc')
@@ -176,15 +176,15 @@ if env['PLATFORM'] == 'posix':
env.Append(CCFLAGS = ['-Wno-unused-function'])
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
input_files.append('ports/SkThread_pthread.cpp')
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
input_files.append('ext/bitmap_platform_device_mac.cc')
input_files.append('ext/platform_canvas_mac.cc')
input_files.append('ext/platform_device_mac.cc')
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.append('ext/bitmap_platform_device_win.cc')
input_files.append('ext/platform_canvas_win.cc')
input_files.append('ext/platform_device_win.cc')
diff --git a/testing/SConscript.gtest b/testing/SConscript.gtest
index bc5456a..ec82e4b 100644
--- a/testing/SConscript.gtest
+++ b/testing/SConscript.gtest
@@ -13,7 +13,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
diff --git a/third_party/bspatch/bspatch.scons b/third_party/bspatch/bspatch.scons
index 6160e66..06db297 100644
--- a/third_party/bspatch/bspatch.scons
+++ b/third_party/bspatch/bspatch.scons
@@ -10,14 +10,14 @@ env.ApplySConscript([
'$LZMA_SDK_DIR/using_lzma_sdk.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
'/wd4800',
],
)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
# We're not responsible for bad warning hygiene in this third party code.
env.FilterOut(
CXXFLAGS = ['-Wall'],
diff --git a/third_party/bzip2/bzip2.scons b/third_party/bzip2/bzip2.scons
index 6089ea1..7b1a57a 100644
--- a/third_party/bzip2/bzip2.scons
+++ b/third_party/bzip2/bzip2.scons
@@ -19,7 +19,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
diff --git a/third_party/libevent/libevent.scons b/third_party/libevent/libevent.scons
index 82e54ce..124f825 100644
--- a/third_party/libevent/libevent.scons
+++ b/third_party/libevent/libevent.scons
@@ -19,7 +19,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
env.Prepend(
CPPPATH = [
'$LIBEVENT_DIR/generated/',
@@ -31,7 +31,7 @@ if env['PLATFORM'] == 'darwin':
'sh ${SOURCES[0]} ${SOURCES[1]}')
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
env.Prepend(
CPPPATH = [
'$LIBEVENT_DIR/linux/',
@@ -61,13 +61,13 @@ input_files = [
'strlcpy.c',
]
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
input_files.extend([
'epoll.c',
'epoll_sub.c',
])
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
input_files.extend([
'kqueue.c',
])
diff --git a/third_party/libjpeg/libjpeg.scons b/third_party/libjpeg/libjpeg.scons
index fdb2c2a..16b6bc3 100644
--- a/third_party/libjpeg/libjpeg.scons
+++ b/third_party/libjpeg/libjpeg.scons
@@ -41,14 +41,14 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
'/wd4800',
],
)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
if '-Wall' in env['CCFLAGS']:
# We're not responsible for bad warning hygiene in this third party code.
env['CCFLAGS'].remove('-Wall')
diff --git a/third_party/libpng/libpng.scons b/third_party/libpng/libpng.scons
index 01a932d..9187b5d 100644
--- a/third_party/libpng/libpng.scons
+++ b/third_party/libpng/libpng.scons
@@ -24,7 +24,7 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
diff --git a/third_party/libxml/libxml.scons b/third_party/libxml/libxml.scons
index d403cd4..d8ba51f 100644
--- a/third_party/libxml/libxml.scons
+++ b/third_party/libxml/libxml.scons
@@ -49,14 +49,14 @@ env.Prepend(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
'/wd4800',
],
)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
env.Append(
CPPDEFINES = [
'_REENTRANT',
@@ -116,7 +116,7 @@ input_files = [
env.ChromeStaticLibrary('libxml', input_files)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
config_files = [
# The configure.js script must be first in this list; the
# env.Command() call below executes the first list element.
@@ -146,7 +146,7 @@ if env['PLATFORM'] == 'win32':
copied_files,
'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS',
CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes')
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
config_files = [
'config.h',
'include/libxml/xmlversion.h',
diff --git a/third_party/libxslt/libxslt.scons b/third_party/libxslt/libxslt.scons
index 9a9ff71..6009d9f 100644
--- a/third_party/libxslt/libxslt.scons
+++ b/third_party/libxslt/libxslt.scons
@@ -55,7 +55,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
@@ -88,7 +88,7 @@ input_files = [
env.ChromeStaticLibrary('libxslt', input_files)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
config_files = [
# The configure.js script must be first in this list; the
# env.Command() call below executes the first list element.
@@ -120,7 +120,7 @@ if env['PLATFORM'] == 'win32':
copied_sources,
'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS',
CONFIG_OPTIONS='compiler=msvc')
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
config_files = [
'config.h',
'xslt-config',
diff --git a/third_party/lzma_sdk/lzma_sdk.scons b/third_party/lzma_sdk/lzma_sdk.scons
index 86ea6aa..82da4b4 100644
--- a/third_party/lzma_sdk/lzma_sdk.scons
+++ b/third_party/lzma_sdk/lzma_sdk.scons
@@ -23,7 +23,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
diff --git a/third_party/sqlite/SConscript b/third_party/sqlite/SConscript
index b348a54..a27c0fe 100644
--- a/third_party/sqlite/SConscript
+++ b/third_party/sqlite/SConscript
@@ -28,7 +28,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
diff --git a/third_party/zlib/zlib.scons b/third_party/zlib/zlib.scons
index d37fafa..23809d4 100644
--- a/third_party/zlib/zlib.scons
+++ b/third_party/zlib/zlib.scons
@@ -18,7 +18,7 @@ env.Append(
ZLIB_LIB = ['zlib'],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TC',
diff --git a/webkit/SConscript b/webkit/SConscript
index 5867657..2cb73e7 100644
--- a/webkit/SConscript
+++ b/webkit/SConscript
@@ -40,9 +40,9 @@ port_dir = env.Dir('$WEBKIT_DIR/port')
port_dir.addRepository(env.Dir('$CHROME_SRC_DIR/webkit/port'))
port_dir.addRepository(env.Dir('$CHROME_SRC_DIR/third_party/WebKit/WebCore'))
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env['WEBKIT_PLATFORM_SUBDIR'] = 'win'
-elif env['PLATFORM'] == 'darwin':
+elif env.Bit('mac'):
env['WEBKIT_PLATFORM_SUBDIR'] = 'mac'
env.Append(
CCFLAGS = [
@@ -56,7 +56,7 @@ elif env['PLATFORM'] == 'darwin':
'$CHROME_SRC_DIR/third_party/WebKit/WebCore/loader/archive/cf',
]]
)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
env.Append(
CPPDEFINES = [
# We want webkit to use pthreads rather than gthread.
@@ -64,7 +64,7 @@ elif env['PLATFORM'] == 'posix':
],
)
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
env.Append(
CCFLAGS = [
'-Wno-parentheses',
@@ -234,7 +234,7 @@ sconscript_dirs = env.ChromiumLoadComponentSConscripts(
test_shell = 'tools/test_shell/SConscript',
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# These extra dirs aren't win32-specific, they're just the dirs that
# haven't yet been made portable.
sconscript_dirs.extend(env.ChromiumLoadComponentSConscripts(
@@ -272,7 +272,7 @@ env.SConscript(sconscript_dirs, exports=['env', 'env_res'])
# Instead we're going to let all the subsidiary SConscript files
# add their own individual targets to the 'webkit' Alias.
#env.Alias('webkit', ['.', '$DESTINATION_ROOT/icudt38.dll'])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Alias('webkit', ['$DESTINATION_ROOT/icudt38.dll'])
version = env.Command('$WEBKIT_DIR/build/WebCore/webkit_version.h',
diff --git a/webkit/SConscript.javascriptcore_pcre b/webkit/SConscript.javascriptcore_pcre
index eecfa11..61ff502 100644
--- a/webkit/SConscript.javascriptcore_pcre
+++ b/webkit/SConscript.javascriptcore_pcre
@@ -15,7 +15,7 @@ env.Prepend(
'$WEBKIT_DIR/build/JSConfig/WebCore/v8',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/TP',
diff --git a/webkit/SConscript.port b/webkit/SConscript.port
index 37c24f2..73a7d92 100644
--- a/webkit/SConscript.port
+++ b/webkit/SConscript.port
@@ -6,7 +6,7 @@ Import('env')
env = env.Clone()
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/TP',
@@ -17,7 +17,7 @@ if env['PLATFORM'] == 'win32':
'/wd4521',
'/wd4800',
],)
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
env.Append(
# For the image readers and decoders:
CXXFLAGS = ["-Wno-sign-compare"],
@@ -110,7 +110,7 @@ input_files = [
'$PORT_DIR/plugins/chromium/PluginDataChromium.cpp',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# Windows specific implementations.
input_files.extend([
'$PORT_DIR/platform/chromium/FileSystemChromiumWin.cpp',
@@ -131,7 +131,7 @@ if env['PLATFORM'] == 'win32':
'$PORT_DIR/rendering/RenderThemeWin.cpp',
])
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
# Linux specific implementations.
input_files.extend([
'$PORT_DIR/platform/chromium/FileSystemChromiumLinux.cpp',
@@ -157,7 +157,7 @@ if env['PLATFORM'] == 'posix':
]
input_files = list(set(input_files) - set(to_be_ported_files))
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
# Mac specific implementations.
input_files.extend([
'$PORT_DIR/bridge/mac/FrameMac.mm',
@@ -167,6 +167,8 @@ if env['PLATFORM'] == 'darwin':
'$PORT_DIR/platform/PluginStubsMac.cpp',
'$PORT_DIR/platform/mac/DragDataMac.mm',
'$PORT_DIR/platform/graphics/mac/FontCacheMacPending.cpp',
+ '$PORT_DIR/platform/graphics/skia/public/PlatformCanvasMac.cpp',
+ '$PORT_DIR/platform/graphics/skia/public/PlatformDeviceMac.cpp',
'$PORT_DIR/rendering/RenderThemeMac.mm',
])
diff --git a/webkit/build/JavaScriptCore/SConscript b/webkit/build/JavaScriptCore/SConscript
index b4f3596..9a3f119 100644
--- a/webkit/build/JavaScriptCore/SConscript
+++ b/webkit/build/JavaScriptCore/SConscript
@@ -120,7 +120,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CPPPATH = [
# Windows workarounds to not having pthread.h and sched.h
@@ -157,11 +157,11 @@ wtf_inputs = [
'$WTF_DIR/unicode/icu/CollatorICU.cpp',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
wtf_inputs.extend([
'$WTF_DIR/ThreadingWin.cpp',
])
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
wtf_inputs.extend([
'$WTF_DIR/gtk/MainThreadGtk.cpp',
'$WTF_DIR/ThreadingPthreads.cpp',
diff --git a/webkit/build/V8Bindings/SConscript b/webkit/build/V8Bindings/SConscript
index 8f3aa71..60e38aa 100644
--- a/webkit/build/V8Bindings/SConscript
+++ b/webkit/build/V8Bindings/SConscript
@@ -6,7 +6,7 @@ Import('env')
env = env.Clone()
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CPPDEFINES = [
'NOGDI',
@@ -344,7 +344,7 @@ inputs = [
'$PORT_DIR/page/inspector/InspectorController.cpp',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
inputs.append('precompiled_v8bindings.cpp')
env.ChromeStaticLibrary('V8Bindings', inputs)
diff --git a/webkit/build/WebCore/SConscript b/webkit/build/WebCore/SConscript
index fdab0a5..869f493 100644
--- a/webkit/build/WebCore/SConscript
+++ b/webkit/build/WebCore/SConscript
@@ -6,7 +6,7 @@ Import('env')
env = env.Clone()
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
@@ -24,7 +24,7 @@ if env['PLATFORM'] == 'win32':
],
)
-if env['PLATFORM'] in ('darwin', 'posix'):
+if env.Bit('posix'):
if '-Wall' in env['CXXFLAGS'] and '-Werror' in env['CXXFLAGS']:
# It'd be nice to fix these warnings upstream, but we're not going to
# block on it.
@@ -803,7 +803,7 @@ input_files = [
]
# These files don't compile yet on linux or mac.
-if env['PLATFORM'] in ('darwin'):
+if env.Bit('mac'):
remove_files = [
# includes platform specific FontCustomPlatformData.h
'$WEBCORE_DIR/css/CSSFontFaceSource.cpp',
@@ -813,7 +813,7 @@ if env['PLATFORM'] in ('darwin'):
input_files.remove(remove)
# These files don't compile on the mac
-if env['PLATFORM'] in ('darwin'):
+if env.Bit('mac'):
remove_files = [
# Missing WebCore::FrameView::printPanScrollIcon
'$WEBCORE_DIR/page/EventHandler.cpp',
@@ -822,7 +822,7 @@ if env['PLATFORM'] in ('darwin'):
input_files.remove(remove)
# Precompiled headers only work under MSVC in scons.
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env_p = env.Clone()
env_p.Append(CCFLAGS='/Ylwebcore')
pch, obj = env_p.PCH('$OBJ_ROOT/webkit/build/precompiled_webkit.cc')
diff --git a/webkit/build/localized_strings/SConscript b/webkit/build/localized_strings/SConscript
index 5d7cef2..7e99dc7 100644
--- a/webkit/build/localized_strings/SConscript
+++ b/webkit/build/localized_strings/SConscript
@@ -16,7 +16,7 @@ env_res.Append(
],
)
-if env_res['PLATFORM'] == 'win32':
+if env_res.Bit('windows'):
env_res.Append(
RCFLAGS = [
["/l", "0x409"],
@@ -34,6 +34,6 @@ generated = env_grd.GRIT(
'$TARGET_ROOT/grit_derived_sources/fake_generated_target',
'$CHROME_SRC_DIR/webkit/glue/webkit_strings.grd')
-if env_res['PLATFORM'] == 'win32':
+if env_res.Bit('windows'):
for g in [g for g in generated if str(g).endswith('.rc')]:
env_res.RES(g)
diff --git a/webkit/build/port/SConscript b/webkit/build/port/SConscript
index 6b63e84..f374253 100644
--- a/webkit/build/port/SConscript
+++ b/webkit/build/port/SConscript
@@ -125,7 +125,7 @@ env.Replace(
'${SOURCES[0].posix}',
)
-if env['PLATFORM'] == 'mac': # Mac OS X
+if env.Bit('mac'): # Mac OS X
env['BINDINGSPREFIX'] = 'DOM'
env['BINDINGS_GENERATOR_ARG'] = 'ObjC'
env['BINDINGS_LANGUAGE'] = 'LANGUAGE_OBJECTIVE_C'
diff --git a/webkit/default_plugin/SConscript b/webkit/default_plugin/SConscript
index 5561bc1..ee48344 100644
--- a/webkit/default_plugin/SConscript
+++ b/webkit/default_plugin/SConscript
@@ -24,7 +24,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
@@ -39,7 +39,7 @@ input_files = [
]
# TODO: Quarantine files -- need porting to platform-specific blocks above.
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'activex_installer.cc',
'default_plugin.cc',
diff --git a/webkit/glue/SConscript b/webkit/glue/SConscript
index 68e16bd..81669fb 100644
--- a/webkit/glue/SConscript
+++ b/webkit/glue/SConscript
@@ -12,7 +12,7 @@ env.Append(
]
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
CCFLAGS = [
'/TP',
@@ -81,7 +81,7 @@ input_files = [
'webview_impl.cc',
]
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
# TODO(port): until we have plugin support for Linux, these files aren't
# built.
remove_files = [
@@ -94,7 +94,7 @@ if env['PLATFORM'] == 'posix':
for file in remove_files:
input_files.remove(file)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): These extra files aren't win32-specific, they've just not been
# tested on other platforms yet.
input_files.extend([
@@ -108,25 +108,25 @@ if env['PLATFORM'] == 'win32':
'webdropdata.cc',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
'plugins/plugin_stream_win.cc',
'webcursor_win.cc',
'webinputevent_win.cc',
'webkit_glue_win.cc',
])
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
input_files.extend([
'webcursor_gtk.cc',
'webinputevent_linux.cc',
'webkit_glue_gtk.cc',
])
-elif env['PLATFORM'] == 'darwin':
+elif env.Bit('mac'):
input_files.extend([
'webcursor_mac.mm',
])
-if env['PLATFORM'] in ('posix', 'darwin'):
+if env.Bit('posix'):
input_files.extend([
'plugins/plugin_stream_posix.cc',
])
diff --git a/webkit/glue/plugins/test/SConscript b/webkit/glue/plugins/test/SConscript
index be4207c..6551a0d 100644
--- a/webkit/glue/plugins/test/SConscript
+++ b/webkit/glue/plugins/test/SConscript
@@ -19,7 +19,7 @@ input_files = [
'plugin_test.cc'
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): Port these.
input_files.extend([
'plugin_execute_script_delete_test.cc',
@@ -36,7 +36,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
env_res.RES('npapi_test.rc'),
'npapi_test.def'
diff --git a/webkit/tools/npapi_layout_test_plugin/SConscript b/webkit/tools/npapi_layout_test_plugin/SConscript
index b4568b8..339643d 100644
--- a/webkit/tools/npapi_layout_test_plugin/SConscript
+++ b/webkit/tools/npapi_layout_test_plugin/SConscript
@@ -13,7 +13,7 @@ input_files = [
'TestObject.cpp'
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
input_files.extend([
env_res.RES('npapi_layout_test_plugin.rc'),
'npapi_layout_test_plugin.def'
diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript
index 85ffe48..f335a46 100644
--- a/webkit/tools/test_shell/SConscript
+++ b/webkit/tools/test_shell/SConscript
@@ -13,7 +13,7 @@ env.SConscript([
'$CHROME_SRC_DIR/build/using_v8.scons',
], {'env':env})
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env_res.Append(
CPPPATH = [
'.',
@@ -58,7 +58,7 @@ env.Append(
],
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): put portable libs in above declaration.
env.Append(
LIBS = [
@@ -67,7 +67,7 @@ if env['PLATFORM'] == 'win32':
]
)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Append(
LIBS = [
'comctl32.lib',
@@ -90,14 +90,14 @@ if env['PLATFORM'] == 'win32':
'/nxcompat',
],
)
-elif env['PLATFORM'] in ('posix', 'darwin'):
+elif env.Bit('posix'):
env.Append(
LIBS = [
'event',
]
)
-if env['PLATFORM'] == 'darwin':
+if env.Bit('mac'):
env.Append(
CPPPATH = [
'$THIRD_PARTY_DIR/WebKit/WebKit/mac/WebCoreSupport',
@@ -115,7 +115,7 @@ input_files = [
'test_webview_delegate.cc',
'text_input_controller.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): Consider porting drag_delegate.cc and drop_delecate.cc.
input_files.extend([
'drag_delegate.cc',
@@ -125,7 +125,7 @@ if env['PLATFORM'] == 'win32':
'webview_host_win.cc',
'webwidget_host_win.cc',
])
-elif env['PLATFORM'] == 'posix':
+elif env.Bit('linux'):
input_files.extend([
'webview_host_gtk.cc',
'webwidget_host_gtk.cc',
@@ -140,7 +140,7 @@ exe_input_files = [
'test_shell_main.cc',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): figure out what to do with resources.
resources = [
env_res.RES('resources/test_shell.rc'),
@@ -157,7 +157,7 @@ test_shell = env.ChromeProgram('test_shell', resources + exe_input_files)
i = env.Install('$TARGET_ROOT', test_shell)
env.Alias('webkit', i)
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Depends(test_shell, '$V8_DIR/vc80.pdb')
test_files = [
@@ -189,7 +189,7 @@ test_files = [
'$V8_DIR/snapshot-empty$OBJSUFFIX',
]
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
# TODO(port): put portable files in above test_files declaration.
test_files.extend([
'plugin_tests.cc',