| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 'simulator:arm': ['simulator-arm.cc'], | 57 'simulator:arm': ['simulator-arm.cc'], |
| 58 'os:linux': ['platform-linux.cc'], | 58 'os:linux': ['platform-linux.cc'], |
| 59 'os:macos': ['platform-macos.cc'], | 59 'os:macos': ['platform-macos.cc'], |
| 60 'os:nullos': ['platform-nullos.cc'], | 60 'os:nullos': ['platform-nullos.cc'], |
| 61 'os:win32': ['platform-win32.cc'], | 61 'os:win32': ['platform-win32.cc'], |
| 62 'mode:release': [], | 62 'mode:release': [], |
| 63 'mode:debug': ['objects-debug.cc', 'prettyprinter.cc'] | 63 'mode:debug': ['objects-debug.cc', 'prettyprinter.cc'] |
| 64 } | 64 } |
| 65 | 65 |
| 66 | 66 |
| 67 D8_FILES = { |
| 68 'all': [ |
| 69 'd8.cc' |
| 70 ], |
| 71 'console:readline': [ |
| 72 'd8-readline.cc' |
| 73 ] |
| 74 } |
| 75 |
| 76 |
| 67 LIBRARY_FILES = ''' | 77 LIBRARY_FILES = ''' |
| 68 runtime.js | 78 runtime.js |
| 69 v8natives.js | 79 v8natives.js |
| 70 array.js | 80 array.js |
| 71 string.js | 81 string.js |
| 72 uri.js | 82 uri.js |
| 73 math.js | 83 math.js |
| 74 messages.js | 84 messages.js |
| 75 apinatives.js | 85 apinatives.js |
| 76 debug-delay.js | 86 debug-delay.js |
| (...skipping 20 matching lines...) Expand all Loading... |
| 97 def ConfigureObjectFiles(): | 107 def ConfigureObjectFiles(): |
| 98 env = Environment() | 108 env = Environment() |
| 99 env.Replace(**context.flags['v8']) | 109 env.Replace(**context.flags['v8']) |
| 100 context.ApplyEnvOverrides(env) | 110 context.ApplyEnvOverrides(env) |
| 101 env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) | 111 env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) |
| 102 env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile $LOGFI
LE') | 112 env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile $LOGFI
LE') |
| 103 | 113 |
| 104 # Build the standard platform-independent source files. | 114 # Build the standard platform-independent source files. |
| 105 source_files = context.GetRelevantSources(SOURCES) | 115 source_files = context.GetRelevantSources(SOURCES) |
| 106 | 116 |
| 117 d8_files = context.GetRelevantSources(D8_FILES) |
| 118 d8_js = env.JS2C('d8-js.cc', 'd8.js', TYPE='D8') |
| 119 d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) |
| 120 d8_objs = [context.ConfigureObject(env, [d8_files]), d8_js_obj] |
| 121 |
| 107 # Combine the JavaScript library files into a single C++ file and | 122 # Combine the JavaScript library files into a single C++ file and |
| 108 # compile it. | 123 # compile it. |
| 109 library_files = [s for s in LIBRARY_FILES] | 124 library_files = [s for s in LIBRARY_FILES] |
| 110 library_files.append('macros.py') | 125 library_files.append('macros.py') |
| 111 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt
y.cc'], library_files) | 126 libraries_src, libraries_empty_src = env.JS2C(['libraries.cc', 'libraries-empt
y.cc'], library_files, TYPE='CORE') |
| 112 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) | 127 libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) |
| 113 | 128 |
| 114 # Build JSCRE. | 129 # Build JSCRE. |
| 115 jscre_env = env.Copy() | 130 jscre_env = env.Copy() |
| 116 jscre_env.Replace(**context.flags['jscre']) | 131 jscre_env.Replace(**context.flags['jscre']) |
| 117 jscre_files = [join('third_party', 'jscre', s) for s in JSCRE_FILES] | 132 jscre_files = [join('third_party', 'jscre', s) for s in JSCRE_FILES] |
| 118 jscre_obj = context.ConfigureObject(jscre_env, jscre_files) | 133 jscre_obj = context.ConfigureObject(jscre_env, jscre_files) |
| 119 | 134 |
| 120 # Build dtoa. | 135 # Build dtoa. |
| 121 dtoa_env = env.Copy() | 136 dtoa_env = env.Copy() |
| 122 dtoa_env.Replace(**context.flags['dtoa']) | 137 dtoa_env.Replace(**context.flags['dtoa']) |
| 123 dtoa_files = ['dtoa-config.c'] | 138 dtoa_files = ['dtoa-config.c'] |
| 124 dtoa_obj = context.ConfigureObject(dtoa_env, dtoa_files) | 139 dtoa_obj = context.ConfigureObject(dtoa_env, dtoa_files) |
| 125 | 140 |
| 126 source_objs = context.ConfigureObject(env, source_files) | 141 source_objs = context.ConfigureObject(env, source_files) |
| 127 non_snapshot_files = [jscre_obj, dtoa_obj, source_objs] | 142 non_snapshot_files = [jscre_obj, dtoa_obj, source_objs] |
| 128 | 143 |
| 129 # Create snapshot if necessary. | 144 # Create snapshot if necessary. |
| 130 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') | 145 empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') |
| 131 if context.use_snapshot: | 146 if context.use_snapshot: |
| 132 mksnapshot_src = 'mksnapshot.cc' | 147 mksnapshot_src = 'mksnapshot.cc' |
| 133 mksnapshot = env.Program('mksnapshot', [mksnapshot_src, libraries_obj, non_s
napshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') | 148 mksnapshot = env.Program('mksnapshot', [mksnapshot_src, libraries_obj, non_s
napshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') |
| 134 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot
.log').abspath) | 149 snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot
.log').abspath) |
| 135 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) | 150 snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) |
| 136 libraries_obj = context.ConfigureObject(env, libraries_empty_src, CPPPATH=['
.']) | 151 libraries_obj = context.ConfigureObject(env, libraries_empty_src, CPPPATH=['
.']) |
| 137 else: | 152 else: |
| 138 snapshot_obj = empty_snapshot_obj | 153 snapshot_obj = empty_snapshot_obj |
| 139 | 154 |
| 140 return [non_snapshot_files, libraries_obj, snapshot_obj] | 155 library_objs = [non_snapshot_files, libraries_obj, snapshot_obj] |
| 156 return (library_objs, d8_objs) |
| 141 | 157 |
| 142 | 158 |
| 143 library_objects = ConfigureObjectFiles() | 159 (library_objs, d8_objs) = ConfigureObjectFiles() |
| 144 Return('library_objects') | 160 Return('library_objs d8_objs') |
| OLD | NEW |