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

Side by Side Diff: src/SConscript

Issue 6772002: Introduce scons target to build preparser libraray and proof-of-concept command line process. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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 | « preparser/SConscript ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 the V8 project authors. All rights reserved. 1 # Copyright 2011 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 'os:cygwin': ['platform-cygwin.cc', 'platform-posix.cc'], 243 'os:cygwin': ['platform-cygwin.cc', 'platform-posix.cc'],
244 'os:nullos': ['platform-nullos.cc'], 244 'os:nullos': ['platform-nullos.cc'],
245 'os:win32': ['platform-win32.cc'], 245 'os:win32': ['platform-win32.cc'],
246 'mode:release': [], 246 'mode:release': [],
247 'mode:debug': [ 247 'mode:debug': [
248 'objects-debug.cc', 'prettyprinter.cc', 'regexp-macro-assembler-tracer.cc' 248 'objects-debug.cc', 'prettyprinter.cc', 'regexp-macro-assembler-tracer.cc'
249 ] 249 ]
250 } 250 }
251 251
252 252
253 PREPARSER_SOURCES = {
254 'all': Split("""
255 allocation.cc
256 hashmap.cc
257 preparse-data.cc
258 preparser.cc
259 preparser-api.cc
260 scanner-base.cc
261 token.cc
262 unicode.cc
263 """)
264 }
265
266
253 D8_FILES = { 267 D8_FILES = {
254 'all': [ 268 'all': [
255 'd8.cc', 'd8-debug.cc' 269 'd8.cc', 'd8-debug.cc'
256 ], 270 ],
257 'os:linux': [ 271 'os:linux': [
258 'd8-posix.cc' 272 'd8-posix.cc'
259 ], 273 ],
260 'os:macos': [ 274 'os:macos': [
261 'd8-posix.cc' 275 'd8-posix.cc'
262 ], 276 ],
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 # Combine the JavaScript library files into a single C++ file and 342 # Combine the JavaScript library files into a single C++ file and
329 # compile it. 343 # compile it.
330 library_files = [s for s in LIBRARY_FILES] 344 library_files = [s for s in LIBRARY_FILES]
331 library_files.append('macros.py') 345 library_files.append('macros.py')
332 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt y.cc'], library_files, TYPE='CORE') 346 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt y.cc'], library_files, TYPE='CORE')
333 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) 347 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.'])
334 348
335 source_objs = context.ConfigureObject(env, source_files) 349 source_objs = context.ConfigureObject(env, source_files)
336 non_snapshot_files = [source_objs] 350 non_snapshot_files = [source_objs]
337 351
352 preparser_source_files = context.GetRelevantSources(PREPARSER_SOURCES)
353 preparser_objs = context.ConfigureObject(env, preparser_source_files)
354
338 # Create snapshot if necessary. For cross compilation you should either 355 # Create snapshot if necessary. For cross compilation you should either
339 # do without snapshots and take the performance hit or you should build a 356 # do without snapshots and take the performance hit or you should build a
340 # host VM with the simulator=arm and snapshot=on options and then take the 357 # host VM with the simulator=arm and snapshot=on options and then take the
341 # resulting snapshot.cc file from obj/release and put it in the src 358 # resulting snapshot.cc file from obj/release and put it in the src
342 # directory. Then rebuild the VM with the cross compiler and specify 359 # directory. Then rebuild the VM with the cross compiler and specify
343 # snapshot=nobuild on the scons command line. 360 # snapshot=nobuild on the scons command line.
344 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') 361 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc')
345 mksnapshot_env = env.Copy() 362 mksnapshot_env = env.Copy()
346 mksnapshot_env.Replace(**context.flags['mksnapshot']) 363 mksnapshot_env.Replace(**context.flags['mksnapshot'])
347 mksnapshot_src = 'mksnapshot.cc' 364 mksnapshot_src = 'mksnapshot.cc'
348 mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_o bj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') 365 mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_o bj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb')
349 if context.use_snapshot: 366 if context.use_snapshot:
350 if context.build_snapshot: 367 if context.build_snapshot:
351 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapsh ot.log').abspath) 368 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapsh ot.log').abspath)
352 else: 369 else:
353 snapshot_cc = 'snapshot.cc' 370 snapshot_cc = 'snapshot.cc'
354 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) 371 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.'])
355 else: 372 else:
356 snapshot_obj = empty_snapshot_obj 373 snapshot_obj = empty_snapshot_obj
357 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] 374 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj]
358 return (library_objs, d8_objs, [mksnapshot]) 375 return (library_objs, d8_objs, [mksnapshot], preparser_objs)
359 376
360 377
361 (library_objs, d8_objs, mksnapshot) = ConfigureObjectFiles() 378 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles()
362 Return('library_objs d8_objs mksnapshot') 379 Return('library_objs d8_objs mksnapshot preparser_objs')
OLDNEW
« no previous file with comments | « preparser/SConscript ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698