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 14 matching lines...) Expand all Loading... |
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') | 34 Import('tools') |
| 35 Import('d8_env') |
35 | 36 |
36 | 37 |
37 SOURCES = { | 38 SOURCES = { |
38 'all': Split(""" | 39 'all': Split(""" |
39 accessors.cc | 40 accessors.cc |
40 allocation.cc | 41 allocation.cc |
41 api.cc | 42 api.cc |
42 assembler.cc | 43 assembler.cc |
43 ast.cc | 44 ast.cc |
44 atomicops_internals_x86_gcc.cc | 45 atomicops_internals_x86_gcc.cc |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 # Build the standard platform-independent source files. | 334 # Build the standard platform-independent source files. |
334 source_files = context.GetRelevantSources(SOURCES) | 335 source_files = context.GetRelevantSources(SOURCES) |
335 d8_js = env.JS2C('d8-js.cc', 'd8.js', **{'TYPE': 'D8', 'COMPRESSION': 'off'}) | 336 d8_js = env.JS2C('d8-js.cc', 'd8.js', **{'TYPE': 'D8', 'COMPRESSION': 'off'}) |
336 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) | 337 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) |
337 if context.options['library'] == 'shared': | 338 if context.options['library'] == 'shared': |
338 d8_files = context.GetRelevantSources(D8_LIGHT_FILES) | 339 d8_files = context.GetRelevantSources(D8_LIGHT_FILES) |
339 d8_objs = [] | 340 d8_objs = [] |
340 else: | 341 else: |
341 d8_files = context.GetRelevantSources(D8_FULL_FILES) | 342 d8_files = context.GetRelevantSources(D8_FULL_FILES) |
342 d8_objs = [d8_js_obj] | 343 d8_objs = [d8_js_obj] |
343 d8_objs.append(context.ConfigureObject(env, [d8_files])) | 344 d8_objs.append(context.ConfigureObject(d8_env, [d8_files])) |
344 | 345 |
345 # Combine the JavaScript library files into a single C++ file and | 346 # Combine the JavaScript library files into a single C++ file and |
346 # compile it. | 347 # compile it. |
347 library_files = [s for s in LIBRARY_FILES] | 348 library_files = [s for s in LIBRARY_FILES] |
348 library_files.append('macros.py') | 349 library_files.append('macros.py') |
349 libraries_src = env.JS2C( | 350 libraries_src = env.JS2C( |
350 ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) | 351 ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) |
351 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) | 352 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) |
352 | 353 |
353 # Combine the experimental JavaScript library files into a C++ file | 354 # Combine the experimental JavaScript library files into a C++ file |
(...skipping 29 matching lines...) Expand all Loading... |
383 snapshot_cc = 'snapshot.cc' | 384 snapshot_cc = 'snapshot.cc' |
384 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) | 385 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) |
385 else: | 386 else: |
386 snapshot_obj = empty_snapshot_obj | 387 snapshot_obj = empty_snapshot_obj |
387 library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj,
snapshot_obj] | 388 library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj,
snapshot_obj] |
388 return (library_objs, d8_objs, [mksnapshot], preparser_objs) | 389 return (library_objs, d8_objs, [mksnapshot], preparser_objs) |
389 | 390 |
390 | 391 |
391 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() | 392 (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() |
392 Return('library_objs d8_objs mksnapshot preparser_objs') | 393 Return('library_objs d8_objs mksnapshot preparser_objs') |
OLD | NEW |