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

Unified Diff: base/base_lib.scons

Issue 15051: Convert from using env['PLATFORM'] directly to using the more flexible... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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 | « no previous file | base/base_unittests.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_lib.scons
===================================================================
--- base/base_lib.scons (revision 7247)
+++ base/base_lib.scons (working copy)
@@ -14,7 +14,7 @@
'$ICU38_DIR/using_icu38.scons',
])
-if env['PLATFORM'] == 'win32':
+if env.Bit('windows'):
env.Prepend(
CCFLAGS = [
'/Wp64',
@@ -84,7 +84,7 @@
# 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 @@
'/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 @@
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 @@
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 @@
'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 @@
'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 @@
'worker_pool_mac.mm',
])
-if env['PLATFORM'] == 'posix':
+if env.Bit('linux'):
input_files.extend([
'atomicops_internals_x86_gcc.cc',
'base_paths_linux.cc',
« no previous file with comments | « no previous file | base/base_unittests.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698