| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 import sys | 28 import sys |
| 29 from os.path import join, dirname, abspath | 29 from os.path import join, dirname, abspath |
| 30 root_dir = dirname(File('SConstruct').rfile().abspath) | 30 root_dir = dirname(File('SConstruct').rfile().abspath) |
| 31 sys.path.append(join(root_dir, 'tools')) | 31 sys.path.append(join(root_dir, 'tools')) |
| 32 import js2c | 32 import js2c |
| 33 Import('context') | 33 Import('context') |
| 34 Import('tools') | |
| 35 | 34 |
| 36 | 35 |
| 37 SOURCES = { | 36 SOURCES = { |
| 38 'all': Split(""" | 37 'all': Split(""" |
| 39 accessors.cc | 38 accessors.cc |
| 40 allocation.cc | 39 allocation.cc |
| 41 api.cc | 40 api.cc |
| 42 assembler.cc | 41 assembler.cc |
| 43 ast.cc | 42 ast.cc |
| 44 atomicops_internals_x86_gcc.cc | 43 atomicops_internals_x86_gcc.cc |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 debug-debugger.js | 318 debug-debugger.js |
| 320 '''.split() | 319 '''.split() |
| 321 | 320 |
| 322 | 321 |
| 323 def Abort(message): | 322 def Abort(message): |
| 324 print message | 323 print message |
| 325 sys.exit(1) | 324 sys.exit(1) |
| 326 | 325 |
| 327 | 326 |
| 328 def ConfigureObjectFiles(): | 327 def ConfigureObjectFiles(): |
| 329 env = Environment(tools=tools) | 328 env = Environment() |
| 330 env.Replace(**context.flags['v8']) | 329 env.Replace(**context.flags['v8']) |
| 331 context.ApplyEnvOverrides(env) | 330 context.ApplyEnvOverrides(env) |
| 332 env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) | 331 env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) |
| 333 env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGF
ILE" --log-snapshot-positions') | 332 env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGF
ILE" --log-snapshot-positions') |
| 334 | 333 |
| 335 # Build the standard platform-independent source files. | 334 # Build the standard platform-independent source files. |
| 336 source_files = context.GetRelevantSources(SOURCES) | 335 source_files = context.GetRelevantSources(SOURCES) |
| 337 | 336 |
| 338 d8_files = context.GetRelevantSources(D8_FILES) | 337 d8_files = context.GetRelevantSources(D8_FILES) |
| 339 d8_js = env.JS2C('d8-js.cc', 'd8.js', TYPE='D8') | 338 d8_js = env.JS2C('d8-js.cc', 'd8.js', TYPE='D8') |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 snapshot_cc = 'snapshot.cc' | 370 snapshot_cc = 'snapshot.cc' |
| 372 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) | 371 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) |
| 373 else: | 372 else: |
| 374 snapshot_obj = empty_snapshot_obj | 373 snapshot_obj = empty_snapshot_obj |
| 375 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] | 374 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] |
| 376 return (library_objs, d8_objs, [mksnapshot], preparser_objs) | 375 return (library_objs, d8_objs, [mksnapshot], preparser_objs) |
| 377 | 376 |
| 378 | 377 |
| 379 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() | 378 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() |
| 380 Return('library_objs d8_objs mksnapshot preparser_objs') | 379 Return('library_objs d8_objs mksnapshot preparser_objs') |
| OLD | NEW |