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

Side by Side Diff: SConstruct

Issue 27267: Experimental: periodic merge from the bleeding edge branch to the code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LICENSE ('k') | src/SConscript » ('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 2008 the V8 project authors. All rights reserved. 1 # Copyright 2008 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 'os:linux': { 149 'os:linux': {
150 'LIBS': ['pthread'], 150 'LIBS': ['pthread'],
151 }, 151 },
152 'os:macos': { 152 'os:macos': {
153 'LIBS': ['pthread'], 153 'LIBS': ['pthread'],
154 }, 154 },
155 'os:freebsd': { 155 'os:freebsd': {
156 'LIBS': ['pthread'], 156 'LIBS': ['pthread'],
157 }, 157 },
158 'os:win32': { 158 'os:win32': {
159 'LIBS': ['winmm'], 159 'LIBS': ['winmm', 'ws2_32'],
160 }, 160 },
161 }, 161 },
162 'msvc': { 162 'msvc': {
163 'all': { 163 'all': {
164 'LIBS': ['winmm'] 164 'LIBS': ['winmm', 'ws2_32']
165 }
166 }
167 }
168
169
170 JSCRE_EXTRA_FLAGS = {
171 'gcc': {
172 'all': {
173 'CPPDEFINES': ['SUPPORT_UTF8', 'NO_RECURSE', 'SUPPORT_UCP'],
174 'WARNINGFLAGS': ['-w']
175 },
176 },
177 'msvc': {
178 'all': {
179 'CPPDEFINES': ['SUPPORT_UTF8', 'NO_RECURSE', 'SUPPORT_UCP'],
180 'WARNINGFLAGS': ['/W3', '/WX', '/wd4355', '/wd4800']
181 },
182 'library:shared': {
183 'CPPDEFINES': ['BUILDING_V8_SHARED']
184 } 165 }
185 } 166 }
186 } 167 }
187 168
188 169
189 DTOA_EXTRA_FLAGS = { 170 DTOA_EXTRA_FLAGS = {
190 'gcc': { 171 'gcc': {
191 'all': { 172 'all': {
192 'WARNINGFLAGS': ['-Werror'] 173 'WARNINGFLAGS': ['-Werror']
193 } 174 }
(...skipping 18 matching lines...) Expand all
212 'os:linux': { 193 'os:linux': {
213 'LIBS': ['pthread'], 194 'LIBS': ['pthread'],
214 }, 195 },
215 'os:macos': { 196 'os:macos': {
216 'LIBS': ['pthread'], 197 'LIBS': ['pthread'],
217 }, 198 },
218 'os:freebsd': { 199 'os:freebsd': {
219 'LIBS': ['execinfo', 'pthread'] 200 'LIBS': ['execinfo', 'pthread']
220 }, 201 },
221 'os:win32': { 202 'os:win32': {
222 'LIBS': ['winmm'] 203 'LIBS': ['winmm', 'ws2_32']
223 }, 204 },
224 'wordsize:64': { 205 'wordsize:64': {
225 'CCFLAGS': ['-m32'], 206 'CCFLAGS': ['-m32'],
226 'LINKFLAGS': ['-m32'] 207 'LINKFLAGS': ['-m32']
227 }, 208 },
228 }, 209 },
229 'msvc': { 210 'msvc': {
230 'all': { 211 'all': {
231 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], 212 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'],
232 'LIBS': ['winmm'] 213 'LIBS': ['winmm', 'ws2_32']
233 }, 214 },
234 'library:shared': { 215 'library:shared': {
235 'CPPDEFINES': ['USING_V8_SHARED'] 216 'CPPDEFINES': ['USING_V8_SHARED']
236 } 217 }
237 } 218 }
238 } 219 }
239 220
240 221
241 SAMPLE_FLAGS = { 222 SAMPLE_FLAGS = {
242 'all': { 223 'all': {
243 'CPPPATH': [join(abspath('.'), 'include')], 224 'CPPPATH': [join(abspath('.'), 'include')],
244 'LIBS': ['$LIBRARY'], 225 'LIBS': ['$LIBRARY'],
245 }, 226 },
246 'gcc': { 227 'gcc': {
247 'all': { 228 'all': {
248 'LIBPATH': ['.'] 229 'LIBPATH': ['.']
249 }, 230 },
250 'os:linux': { 231 'os:linux': {
251 'LIBS': ['pthread'], 232 'LIBS': ['pthread'],
252 }, 233 },
253 'os:macos': { 234 'os:macos': {
254 'LIBS': ['pthread'], 235 'LIBS': ['pthread'],
255 }, 236 },
256 'os:freebsd': { 237 'os:freebsd': {
257 'LIBS': ['execinfo', 'pthread'] 238 'LIBS': ['execinfo', 'pthread']
258 }, 239 },
259 'os:win32': { 240 'os:win32': {
260 'LIBS': ['winmm'] 241 'LIBS': ['winmm', 'ws2_32']
261 }, 242 },
262 'wordsize:64': { 243 'wordsize:64': {
263 'CCFLAGS': ['-m32'], 244 'CCFLAGS': ['-m32'],
264 'LINKFLAGS': ['-m32'] 245 'LINKFLAGS': ['-m32']
265 }, 246 },
266 'mode:release': { 247 'mode:release': {
267 'CCFLAGS': ['-O2'] 248 'CCFLAGS': ['-O2']
268 }, 249 },
269 'mode:debug': { 250 'mode:debug': {
270 'CCFLAGS': ['-g', '-O0'] 251 'CCFLAGS': ['-g', '-O0']
271 } 252 }
272 }, 253 },
273 'msvc': { 254 'msvc': {
274 'all': { 255 'all': {
275 'CCFLAGS': ['/nologo'], 256 'CCFLAGS': ['/nologo'],
276 'LINKFLAGS': ['/nologo'], 257 'LINKFLAGS': ['/nologo'],
277 'LIBS': ['winmm'] 258 'LIBS': ['winmm', 'ws2_32']
278 }, 259 },
279 'library:shared': { 260 'library:shared': {
280 'CPPDEFINES': ['USING_V8_SHARED'] 261 'CPPDEFINES': ['USING_V8_SHARED']
281 }, 262 },
282 'prof:on': { 263 'prof:on': {
283 'LINKFLAGS': ['/MAP'] 264 'LINKFLAGS': ['/MAP']
284 }, 265 },
285 'mode:release': { 266 'mode:release': {
286 'CCFLAGS': ['/O2'], 267 'CCFLAGS': ['/O2'],
287 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'], 268 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'],
(...skipping 26 matching lines...) Expand all
314 'os:linux': { 295 'os:linux': {
315 'LIBS': ['pthread'], 296 'LIBS': ['pthread'],
316 }, 297 },
317 'os:macos': { 298 'os:macos': {
318 'LIBS': ['pthread'], 299 'LIBS': ['pthread'],
319 }, 300 },
320 'os:freebsd': { 301 'os:freebsd': {
321 'LIBS': ['pthread'], 302 'LIBS': ['pthread'],
322 }, 303 },
323 'os:win32': { 304 'os:win32': {
324 'LIBS': ['winmm'], 305 'LIBS': ['winmm', 'ws2_32'],
325 }, 306 },
326 }, 307 },
327 'msvc': { 308 'msvc': {
328 'all': { 309 'all': {
329 'LIBS': ['winmm'] 310 'LIBS': ['winmm', 'ws2_32']
330 } 311 }
331 } 312 }
332 } 313 }
333 314
334 315
335 SUFFIXES = { 316 SUFFIXES = {
336 'release': '', 317 'release': '',
337 'debug': '_g' 318 'debug': '_g'
338 } 319 }
339 320
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 options = {'mode': mode} 538 options = {'mode': mode}
558 for option in SIMPLE_OPTIONS: 539 for option in SIMPLE_OPTIONS:
559 options[option] = env[option] 540 options[option] = env[option]
560 PostprocessOptions(options) 541 PostprocessOptions(options)
561 542
562 context = BuildContext(options, env_overrides, samples=SplitList(env['sample'] )) 543 context = BuildContext(options, env_overrides, samples=SplitList(env['sample'] ))
563 544
564 library_flags = context.AddRelevantFlags(os.environ, LIBRARY_FLAGS) 545 library_flags = context.AddRelevantFlags(os.environ, LIBRARY_FLAGS)
565 v8_flags = context.AddRelevantFlags(library_flags, V8_EXTRA_FLAGS) 546 v8_flags = context.AddRelevantFlags(library_flags, V8_EXTRA_FLAGS)
566 mksnapshot_flags = context.AddRelevantFlags(library_flags, MKSNAPSHOT_EXTRA_FL AGS) 547 mksnapshot_flags = context.AddRelevantFlags(library_flags, MKSNAPSHOT_EXTRA_FL AGS)
567 jscre_flags = context.AddRelevantFlags(library_flags, JSCRE_EXTRA_FLAGS)
568 dtoa_flags = context.AddRelevantFlags(library_flags, DTOA_EXTRA_FLAGS) 548 dtoa_flags = context.AddRelevantFlags(library_flags, DTOA_EXTRA_FLAGS)
569 cctest_flags = context.AddRelevantFlags(v8_flags, CCTEST_EXTRA_FLAGS) 549 cctest_flags = context.AddRelevantFlags(v8_flags, CCTEST_EXTRA_FLAGS)
570 sample_flags = context.AddRelevantFlags(os.environ, SAMPLE_FLAGS) 550 sample_flags = context.AddRelevantFlags(os.environ, SAMPLE_FLAGS)
571 d8_flags = context.AddRelevantFlags(library_flags, D8_FLAGS) 551 d8_flags = context.AddRelevantFlags(library_flags, D8_FLAGS)
572 552
573 context.flags = { 553 context.flags = {
574 'v8': v8_flags, 554 'v8': v8_flags,
575 'mksnapshot': mksnapshot_flags, 555 'mksnapshot': mksnapshot_flags,
576 'jscre': jscre_flags,
577 'dtoa': dtoa_flags, 556 'dtoa': dtoa_flags,
578 'cctest': cctest_flags, 557 'cctest': cctest_flags,
579 'sample': sample_flags, 558 'sample': sample_flags,
580 'd8': d8_flags 559 'd8': d8_flags
581 } 560 }
582 561
583 target_id = mode 562 target_id = mode
584 suffix = SUFFIXES[target_id] 563 suffix = SUFFIXES[target_id]
585 library_name = 'v8' + suffix 564 library_name = 'v8' + suffix
586 env['LIBRARY'] = library_name 565 env['LIBRARY'] = library_name
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 # version of scons. Also, there's a bug in some revisions that 658 # version of scons. Also, there's a bug in some revisions that
680 # doesn't allow this flag to be set, so we swallow any exceptions. 659 # doesn't allow this flag to be set, so we swallow any exceptions.
681 # Lovely. 660 # Lovely.
682 try: 661 try:
683 SetOption('warn', 'no-deprecated') 662 SetOption('warn', 'no-deprecated')
684 except: 663 except:
685 pass 664 pass
686 665
687 666
688 Build() 667 Build()
OLDNEW
« no previous file with comments | « LICENSE ('k') | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698