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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/base_unittests.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 __doc__ = """ 5 __doc__ = """
6 Configuration for building base.lib / libbase.a. 6 Configuration for building base.lib / libbase.a.
7 """ 7 """
8 8
9 Import('env') 9 Import('env')
10 10
11 env = env.Clone() 11 env = env.Clone()
12 12
13 env.ApplySConscript([ 13 env.ApplySConscript([
14 '$ICU38_DIR/using_icu38.scons', 14 '$ICU38_DIR/using_icu38.scons',
15 ]) 15 ])
16 16
17 if env['PLATFORM'] == 'win32': 17 if env.Bit('windows'):
18 env.Prepend( 18 env.Prepend(
19 CCFLAGS = [ 19 CCFLAGS = [
20 '/Wp64', 20 '/Wp64',
21 ], 21 ],
22 ) 22 )
23 23
24 # Some files from this list are not yet ported. They are removed from 24 # Some files from this list are not yet ported. They are removed from
25 # the list, see code below. 25 # the list, see code below.
26 input_files = [ 26 input_files = [
27 'at_exit.cc', 27 'at_exit.cc',
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 'tracked.cc', 77 'tracked.cc',
78 'tracked_objects.cc', 78 'tracked_objects.cc',
79 'values.cc', 79 'values.cc',
80 'watchdog.cc', 80 'watchdog.cc',
81 'word_iterator.cc', 81 'word_iterator.cc',
82 ] 82 ]
83 83
84 # Add object files David M Gay's dtoa and g_fmt third party lib. We 84 # Add object files David M Gay's dtoa and g_fmt third party lib. We
85 # compile these separately so we can disable warnings. 85 # compile these separately so we can disable warnings.
86 env_dmg_fp = env.Clone() 86 env_dmg_fp = env.Clone()
87 if env_dmg_fp['PLATFORM'] == 'win32': 87 if env_dmg_fp.Bit('windows'):
88 env_dmg_fp.Append( 88 env_dmg_fp.Append(
89 CCFLAGS = [ 89 CCFLAGS = [
90 '/wd4018', 90 '/wd4018',
91 '/wd4102', 91 '/wd4102',
92 '/wd4244', 92 '/wd4244',
93 '/wd4554', 93 '/wd4554',
94 ], 94 ],
95 ) 95 )
96 elif env_dmg_fp['PLATFORM'] in ('darwin', 'posix'): 96 elif env_dmg_fp.Bit('posix'):
97 for var in ['CCFLAGS', 'CXXFLAGS']: 97 for var in ['CCFLAGS', 'CXXFLAGS']:
98 if '-Wall' in env_dmg_fp[var]: 98 if '-Wall' in env_dmg_fp[var]:
99 env_dmg_fp[var].remove('-Wall') 99 env_dmg_fp[var].remove('-Wall')
100 env_dmg_fp[var].append('-Wno-write-strings') 100 env_dmg_fp[var].append('-Wno-write-strings')
101 101
102 input_files.extend([ 102 input_files.extend([
103 env_dmg_fp.Object('third_party/dmg_fp/dtoa.cc'), 103 env_dmg_fp.Object('third_party/dmg_fp/dtoa.cc'),
104 env_dmg_fp.Object('third_party/dmg_fp/g_fmt.cc'), 104 env_dmg_fp.Object('third_party/dmg_fp/g_fmt.cc'),
105 ]) 105 ])
106 106
107 if env['PLATFORM'] in ('posix', 'darwin'): 107 if env.Bit('posix'):
108 # Remove files that still need to be ported from the input_files list. 108 # Remove files that still need to be ported from the input_files list.
109 # TODO(port): delete files from this list as they get ported. 109 # TODO(port): delete files from this list as they get ported.
110 to_be_ported_files = [ 110 to_be_ported_files = [
111 'clipboard_util.cc', 111 'clipboard_util.cc',
112 'event_recorder.cc', 112 'event_recorder.cc',
113 'file_version_info.cc', 113 'file_version_info.cc',
114 114
115 # We have an implementation of idle_timer, but it's unclear if we want it 115 # We have an implementation of idle_timer, but it's unclear if we want it
116 # yet, so it's commented out for now. Leave this 'unported'. 116 # yet, so it's commented out for now. Leave this 'unported'.
117 'idle_timer.cc', 117 'idle_timer.cc',
118 118
119 'object_watcher.cc', 119 'object_watcher.cc',
120 120
121 'resource_util.cc', # Uses HMODULE, but may be abstractable. 121 'resource_util.cc', # Uses HMODULE, but may be abstractable.
122 ] 122 ]
123 for remove in to_be_ported_files: 123 for remove in to_be_ported_files:
124 input_files.remove(remove) 124 input_files.remove(remove)
125 125
126 if env['PLATFORM'] == 'win32': 126 if env.Bit('windows'):
127 input_files.extend([ 127 input_files.extend([
128 'base_drag_source.cc', 128 'base_drag_source.cc',
129 'base_drop_target.cc', 129 'base_drop_target.cc',
130 'base_paths_win.cc', 130 'base_paths_win.cc',
131 'clipboard_win.cc', 131 'clipboard_win.cc',
132 'condition_variable_win.cc', 132 'condition_variable_win.cc',
133 'cpu.cc', 133 'cpu.cc',
134 'debug_on_start.cc', 134 'debug_on_start.cc',
135 'debug_util_win.cc', 135 'debug_util_win.cc',
136 'directory_watcher_win.cc', 136 'directory_watcher_win.cc',
(...skipping 18 matching lines...) Expand all
155 'thread_local_storage_win.cc', 155 'thread_local_storage_win.cc',
156 'thread_local_win.cc', 156 'thread_local_win.cc',
157 'third_party/purify/pure_api.c', 157 'third_party/purify/pure_api.c',
158 'time_win.cc', 158 'time_win.cc',
159 'waitable_event_win.cc', 159 'waitable_event_win.cc',
160 'win_util.cc', 160 'win_util.cc',
161 'wmi_util.cc', 161 'wmi_util.cc',
162 'worker_pool.cc', 162 'worker_pool.cc',
163 ]) 163 ])
164 164
165 if env['PLATFORM'] in ('darwin', 'posix'): 165 if env.Bit('posix'):
166 input_files.extend([ 166 input_files.extend([
167 'condition_variable_posix.cc', 167 'condition_variable_posix.cc',
168 'debug_util_posix.cc', 168 'debug_util_posix.cc',
169 'file_util_posix.cc', 169 'file_util_posix.cc',
170 'lock_impl_posix.cc', 170 'lock_impl_posix.cc',
171 'message_pump_libevent.cc', 171 'message_pump_libevent.cc',
172 'platform_file_posix.cc', 172 'platform_file_posix.cc',
173 'platform_thread_posix.cc', 173 'platform_thread_posix.cc',
174 'process_util_posix.cc', 174 'process_util_posix.cc',
175 'rand_util_posix.cc', 175 'rand_util_posix.cc',
176 'shared_memory_posix.cc', 176 'shared_memory_posix.cc',
177 'string16.cc', 177 'string16.cc',
178 'sys_info_posix.cc', 178 'sys_info_posix.cc',
179 'thread_local_storage_posix.cc', 179 'thread_local_storage_posix.cc',
180 'thread_local_posix.cc', 180 'thread_local_posix.cc',
181 'time_posix.cc', 181 'time_posix.cc',
182 'waitable_event_generic.cc', 182 'waitable_event_generic.cc',
183 ]) 183 ])
184 184
185 if env['PLATFORM'] == 'darwin': 185 if env.Bit('mac'):
186 input_files.extend([ 186 input_files.extend([
187 'base_paths_mac.mm', 187 'base_paths_mac.mm',
188 'clipboard_mac.mm', 188 'clipboard_mac.mm',
189 'file_util_mac.mm', 189 'file_util_mac.mm',
190 'file_version_info_mac.mm', 190 'file_version_info_mac.mm',
191 'hmac_mac.cc', 191 'hmac_mac.cc',
192 'mac_util.mm', 192 'mac_util.mm',
193 'message_pump_mac.mm', 193 'message_pump_mac.mm',
194 'platform_thread_mac.mm', 194 'platform_thread_mac.mm',
195 'scoped_nsautorelease_pool.mm', 195 'scoped_nsautorelease_pool.mm',
196 'sys_string_conversions_mac.mm', 196 'sys_string_conversions_mac.mm',
197 'test_file_util_mac.cc', 197 'test_file_util_mac.cc',
198 'worker_pool_mac.mm', 198 'worker_pool_mac.mm',
199 ]) 199 ])
200 200
201 if env['PLATFORM'] == 'posix': 201 if env.Bit('linux'):
202 input_files.extend([ 202 input_files.extend([
203 'atomicops_internals_x86_gcc.cc', 203 'atomicops_internals_x86_gcc.cc',
204 'base_paths_linux.cc', 204 'base_paths_linux.cc',
205 'clipboard_linux.cc', 205 'clipboard_linux.cc',
206 'file_util_linux.cc', 206 'file_util_linux.cc',
207 'file_version_info_linux.cc', 207 'file_version_info_linux.cc',
208 'hmac_nss.cc', 208 'hmac_nss.cc',
209 'message_pump_glib.cc', 209 'message_pump_glib.cc',
210 'nss_init.cc', 210 'nss_init.cc',
211 'process_posix.cc', 211 'process_posix.cc',
212 'process_util_linux.cc', 212 'process_util_linux.cc',
213 'sys_string_conversions_linux.cc', 213 'sys_string_conversions_linux.cc',
214 'test_file_util_linux.cc', 214 'test_file_util_linux.cc',
215 'worker_pool.cc', 215 'worker_pool.cc',
216 ]) 216 ])
217 217
218 env.ChromeStaticLibrary('base', input_files) 218 env.ChromeStaticLibrary('base', input_files)
OLDNEW
« 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