| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 apinatives.js | 290 apinatives.js |
| 291 date.js | 291 date.js |
| 292 regexp.js | 292 regexp.js |
| 293 json.js | 293 json.js |
| 294 liveedit-debugger.js | 294 liveedit-debugger.js |
| 295 mirror-debugger.js | 295 mirror-debugger.js |
| 296 debug-debugger.js | 296 debug-debugger.js |
| 297 '''.split() | 297 '''.split() |
| 298 | 298 |
| 299 | 299 |
| 300 EXPERIMENTAL_LIBRARY_FILES = ''' |
| 301 proxy.js |
| 302 '''.split() |
| 303 |
| 304 |
| 300 def Abort(message): | 305 def Abort(message): |
| 301 print message | 306 print message |
| 302 sys.exit(1) | 307 sys.exit(1) |
| 303 | 308 |
| 304 | 309 |
| 305 def ConfigureObjectFiles(): | 310 def ConfigureObjectFiles(): |
| 306 env = Environment(tools=tools) | 311 env = Environment(tools=tools) |
| 307 env.Replace(**context.flags['v8']) | 312 env.Replace(**context.flags['v8']) |
| 308 context.ApplyEnvOverrides(env) | 313 context.ApplyEnvOverrides(env) |
| 309 env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) | 314 env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) |
| 310 env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGF
ILE" --log-snapshot-positions') | 315 env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGF
ILE" --log-snapshot-positions') |
| 311 | 316 |
| 312 # Build the standard platform-independent source files. | 317 # Build the standard platform-independent source files. |
| 313 source_files = context.GetRelevantSources(SOURCES) | 318 source_files = context.GetRelevantSources(SOURCES) |
| 314 | 319 |
| 315 d8_files = context.GetRelevantSources(D8_FILES) | 320 d8_files = context.GetRelevantSources(D8_FILES) |
| 316 d8_js = env.JS2C('d8-js.cc', 'd8.js', TYPE='D8') | 321 d8_js = env.JS2C('d8-js.cc', 'd8.js', TYPE='D8') |
| 317 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) | 322 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) |
| 318 d8_objs = [context.ConfigureObject(env, [d8_files]), d8_js_obj] | 323 d8_objs = [context.ConfigureObject(env, [d8_files]), d8_js_obj] |
| 319 | 324 |
| 320 # Combine the JavaScript library files into a single C++ file and | 325 # Combine the JavaScript library files into a single C++ file and |
| 321 # compile it. | 326 # compile it. |
| 322 library_files = [s for s in LIBRARY_FILES] | 327 library_files = [s for s in LIBRARY_FILES] |
| 323 library_files.append('macros.py') | 328 library_files.append('macros.py') |
| 324 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt
y.cc'], library_files, TYPE='CORE') | 329 libraries_src = env.JS2C(['libraries.cc'], library_files, TYPE='CORE') |
| 325 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) | 330 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) |
| 326 | 331 |
| 332 # Combine the experimental JavaScript library files into a C++ file |
| 333 # and compile it. |
| 334 experimental_library_files = [ s for s in EXPERIMENTAL_LIBRARY_FILES ] |
| 335 experimental_library_files.append('macros.py') |
| 336 experimental_libraries_src = env.JS2C(['experimental-libraries.cc'], experimen
tal_library_files, TYPE='EXPERIMENTAL') |
| 337 experimental_libraries_obj = context.ConfigureObject(env, experimental_librari
es_src, CPPPATH=['.']) |
| 338 |
| 327 source_objs = context.ConfigureObject(env, source_files) | 339 source_objs = context.ConfigureObject(env, source_files) |
| 328 non_snapshot_files = [source_objs] | 340 non_snapshot_files = [source_objs] |
| 329 | 341 |
| 330 preparser_source_files = context.GetRelevantSources(PREPARSER_SOURCES) | 342 preparser_source_files = context.GetRelevantSources(PREPARSER_SOURCES) |
| 331 preparser_objs = context.ConfigureObject(env, preparser_source_files) | 343 preparser_objs = context.ConfigureObject(env, preparser_source_files) |
| 332 | 344 |
| 333 # Create snapshot if necessary. For cross compilation you should either | 345 # Create snapshot if necessary. For cross compilation you should either |
| 334 # do without snapshots and take the performance hit or you should build a | 346 # do without snapshots and take the performance hit or you should build a |
| 335 # host VM with the simulator=arm and snapshot=on options and then take the | 347 # host VM with the simulator=arm and snapshot=on options and then take the |
| 336 # resulting snapshot.cc file from obj/release and put it in the src | 348 # resulting snapshot.cc file from obj/release and put it in the src |
| 337 # directory. Then rebuild the VM with the cross compiler and specify | 349 # directory. Then rebuild the VM with the cross compiler and specify |
| 338 # snapshot=nobuild on the scons command line. | 350 # snapshot=nobuild on the scons command line. |
| 339 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') | 351 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') |
| 340 mksnapshot_env = env.Copy() | 352 mksnapshot_env = env.Copy() |
| 341 mksnapshot_env.Replace(**context.flags['mksnapshot']) | 353 mksnapshot_env.Replace(**context.flags['mksnapshot']) |
| 342 mksnapshot_src = 'mksnapshot.cc' | 354 mksnapshot_src = 'mksnapshot.cc' |
| 343 mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_o
bj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') | 355 mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_o
bj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='m
ksnapshot.exe.pdb') |
| 344 if context.use_snapshot: | 356 if context.use_snapshot: |
| 345 if context.build_snapshot: | 357 if context.build_snapshot: |
| 346 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapsh
ot.log').abspath) | 358 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapsh
ot.log').abspath) |
| 347 else: | 359 else: |
| 348 snapshot_cc = 'snapshot.cc' | 360 snapshot_cc = 'snapshot.cc' |
| 349 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) | 361 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) |
| 350 else: | 362 else: |
| 351 snapshot_obj = empty_snapshot_obj | 363 snapshot_obj = empty_snapshot_obj |
| 352 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] | 364 library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj,
snapshot_obj] |
| 353 return (library_objs, d8_objs, [mksnapshot], preparser_objs) | 365 return (library_objs, d8_objs, [mksnapshot], preparser_objs) |
| 354 | 366 |
| 355 | 367 |
| 356 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() | 368 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() |
| 357 Return('library_objs d8_objs mksnapshot preparser_objs') | 369 Return('library_objs d8_objs mksnapshot preparser_objs') |
| OLD | NEW |