| OLD | NEW |
| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) | 290 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) |
| 291 d8_objs = [context.ConfigureObject(env, [d8_files]), d8_js_obj] | 291 d8_objs = [context.ConfigureObject(env, [d8_files]), d8_js_obj] |
| 292 | 292 |
| 293 # Combine the JavaScript library files into a single C++ file and | 293 # Combine the JavaScript library files into a single C++ file and |
| 294 # compile it. | 294 # compile it. |
| 295 library_files = [s for s in LIBRARY_FILES] | 295 library_files = [s for s in LIBRARY_FILES] |
| 296 library_files.append('macros.py') | 296 library_files.append('macros.py') |
| 297 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt
y.cc'], library_files, TYPE='CORE') | 297 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt
y.cc'], library_files, TYPE='CORE') |
| 298 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) | 298 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) |
| 299 | 299 |
| 300 # Build dtoa. | |
| 301 dtoa_env = env.Copy() | |
| 302 dtoa_env.Replace(**context.flags['dtoa']) | |
| 303 dtoa_files = ['dtoa-config.c'] | |
| 304 dtoa_obj = context.ConfigureObject(dtoa_env, dtoa_files) | |
| 305 | |
| 306 source_objs = context.ConfigureObject(env, source_files) | 300 source_objs = context.ConfigureObject(env, source_files) |
| 307 non_snapshot_files = [dtoa_obj, source_objs] | 301 non_snapshot_files = [source_objs] |
| 308 | 302 |
| 309 # Create snapshot if necessary. For cross compilation you should either | 303 # Create snapshot if necessary. For cross compilation you should either |
| 310 # do without snapshots and take the performance hit or you should build a | 304 # do without snapshots and take the performance hit or you should build a |
| 311 # host VM with the simulator=arm and snapshot=on options and then take the | 305 # host VM with the simulator=arm and snapshot=on options and then take the |
| 312 # resulting snapshot.cc file from obj/release and put it in the src | 306 # resulting snapshot.cc file from obj/release and put it in the src |
| 313 # directory. Then rebuild the VM with the cross compiler and specify | 307 # directory. Then rebuild the VM with the cross compiler and specify |
| 314 # snapshot=nobuild on the scons command line. | 308 # snapshot=nobuild on the scons command line. |
| 315 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') | 309 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') |
| 316 mksnapshot_env = env.Copy() | 310 mksnapshot_env = env.Copy() |
| 317 mksnapshot_env.Replace(**context.flags['mksnapshot']) | 311 mksnapshot_env.Replace(**context.flags['mksnapshot']) |
| 318 mksnapshot_src = 'mksnapshot.cc' | 312 mksnapshot_src = 'mksnapshot.cc' |
| 319 mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_o
bj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') | 313 mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_o
bj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') |
| 320 if context.use_snapshot: | 314 if context.use_snapshot: |
| 321 if context.build_snapshot: | 315 if context.build_snapshot: |
| 322 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapsh
ot.log').abspath) | 316 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapsh
ot.log').abspath) |
| 323 else: | 317 else: |
| 324 snapshot_cc = 'snapshot.cc' | 318 snapshot_cc = 'snapshot.cc' |
| 325 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) | 319 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) |
| 326 else: | 320 else: |
| 327 snapshot_obj = empty_snapshot_obj | 321 snapshot_obj = empty_snapshot_obj |
| 328 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] | 322 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] |
| 329 return (library_objs, d8_objs, [mksnapshot]) | 323 return (library_objs, d8_objs, [mksnapshot]) |
| 330 | 324 |
| 331 | 325 |
| 332 (library_objs, d8_objs, mksnapshot) = ConfigureObjectFiles() | 326 (library_objs, d8_objs, mksnapshot) = ConfigureObjectFiles() |
| 333 Return('library_objs d8_objs mksnapshot') | 327 Return('library_objs d8_objs mksnapshot') |
| OLD | NEW |