Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 1 | # Copyright 2012 the V8 project authors. All rights reserved. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 2 | # Redistribution and use in source and binary forms, with or without |
| 3 | # modification, are permitted provided that the following conditions are |
| 4 | # met: |
| 5 | # |
| 6 | # * Redistributions of source code must retain the above copyright |
| 7 | # notice, this list of conditions and the following disclaimer. |
| 8 | # * Redistributions in binary form must reproduce the above |
| 9 | # copyright notice, this list of conditions and the following |
| 10 | # disclaimer in the documentation and/or other materials provided |
| 11 | # with the distribution. |
| 12 | # * Neither the name of Google Inc. nor the names of its |
| 13 | # contributors may be used to endorse or promote products derived |
| 14 | # from this software without specific prior written permission. |
| 15 | # |
| 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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. |
| 27 | |
| 28 | import sys |
| 29 | from os.path import join, dirname, abspath |
| 30 | root_dir = dirname(File('SConstruct').rfile().abspath) |
| 31 | sys.path.append(join(root_dir, 'tools')) |
| 32 | import js2c |
| 33 | Import('context') |
Ben Murdoch | 8b112d2 | 2011-06-08 16:22:53 +0100 | [diff] [blame] | 34 | Import('tools') |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 35 | Import('d8_env') |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 36 | |
| 37 | |
| 38 | SOURCES = { |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 39 | 'all': Split(""" |
| 40 | accessors.cc |
| 41 | allocation.cc |
| 42 | api.cc |
| 43 | assembler.cc |
| 44 | ast.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 45 | atomicops_internals_x86_gcc.cc |
Russell Brenner | 90bac25 | 2010-11-18 13:33:46 -0800 | [diff] [blame] | 46 | bignum.cc |
Shimeng (Simon) Wang | 8a31eba | 2010-12-06 19:01:33 -0800 | [diff] [blame] | 47 | bignum-dtoa.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 48 | bootstrapper.cc |
| 49 | builtins.cc |
Ben Murdoch | f87a203 | 2010-10-22 12:50:53 +0100 | [diff] [blame] | 50 | cached-powers.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 51 | checks.cc |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 52 | circular-queue.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 53 | code-stubs.cc |
| 54 | codegen.cc |
| 55 | compilation-cache.cc |
| 56 | compiler.cc |
| 57 | contexts.cc |
| 58 | conversions.cc |
| 59 | counters.cc |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 60 | cpu-profiler.cc |
Leon Clarke | 4515c47 | 2010-02-03 11:58:03 +0000 | [diff] [blame] | 61 | data-flow.cc |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 62 | date.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 63 | dateparser.cc |
| 64 | debug-agent.cc |
| 65 | debug.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 66 | deoptimizer.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 67 | disassembler.cc |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 68 | diy-fp.cc |
Kristian Monsen | 25f6136 | 2010-05-21 11:50:48 +0100 | [diff] [blame] | 69 | dtoa.cc |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 70 | elements.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 71 | execution.cc |
| 72 | factory.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 73 | flags.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 74 | frames.cc |
Leon Clarke | d91b9f7 | 2010-01-27 17:25:45 +0000 | [diff] [blame] | 75 | full-codegen.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 76 | func-name-inferrer.cc |
Ben Murdoch | b8e0da2 | 2011-05-16 14:20:40 +0100 | [diff] [blame] | 77 | gdb-jit.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 78 | global-handles.cc |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 79 | fast-dtoa.cc |
Kristian Monsen | 25f6136 | 2010-05-21 11:50:48 +0100 | [diff] [blame] | 80 | fixed-dtoa.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 81 | handles.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 82 | heap-profiler.cc |
| 83 | heap.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 84 | hydrogen.cc |
| 85 | hydrogen-instructions.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 86 | ic.cc |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 87 | incremental-marking.cc |
| 88 | interface.cc |
Ben Murdoch | b8e0da2 | 2011-05-16 14:20:40 +0100 | [diff] [blame] | 89 | inspector.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 90 | interpreter-irregexp.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 91 | isolate.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 92 | jsregexp.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 93 | lithium-allocator.cc |
Ben Murdoch | 086aeea | 2011-05-13 15:57:08 +0100 | [diff] [blame] | 94 | lithium.cc |
Andrei Popescu | 402d937 | 2010-02-26 13:31:12 +0000 | [diff] [blame] | 95 | liveedit.cc |
Steve Block | 1e0659c | 2011-05-24 12:43:12 +0100 | [diff] [blame] | 96 | liveobjectlist.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 97 | log-utils.cc |
| 98 | log.cc |
| 99 | mark-compact.cc |
| 100 | messages.cc |
| 101 | objects.cc |
Steve Block | 1e0659c | 2011-05-24 12:43:12 +0100 | [diff] [blame] | 102 | objects-printer.cc |
Iain Merrick | 7568138 | 2010-08-19 15:07:18 +0100 | [diff] [blame] | 103 | objects-visiting.cc |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 104 | once.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 105 | parser.cc |
Shimeng (Simon) Wang | 8a31eba | 2010-12-06 19:01:33 -0800 | [diff] [blame] | 106 | preparser.cc |
| 107 | preparse-data.cc |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 108 | profile-generator.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 109 | property.cc |
| 110 | regexp-macro-assembler-irregexp.cc |
| 111 | regexp-macro-assembler.cc |
| 112 | regexp-stack.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 113 | rewriter.cc |
| 114 | runtime.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 115 | runtime-profiler.cc |
| 116 | safepoint-table.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 117 | scanner.cc |
Ben Murdoch | 589d697 | 2011-11-30 16:04:58 +0000 | [diff] [blame] | 118 | scanner-character-streams.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 119 | scopeinfo.cc |
| 120 | scopes.cc |
| 121 | serialize.cc |
| 122 | snapshot-common.cc |
| 123 | spaces.cc |
Ben Murdoch | f87a203 | 2010-10-22 12:50:53 +0100 | [diff] [blame] | 124 | string-search.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 125 | string-stream.cc |
Ben Murdoch | f87a203 | 2010-10-22 12:50:53 +0100 | [diff] [blame] | 126 | strtod.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 127 | stub-cache.cc |
| 128 | token.cc |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 129 | type-info.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 130 | unicode.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 131 | utils.cc |
| 132 | v8-counters.cc |
| 133 | v8.cc |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 134 | v8conversions.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 135 | v8threads.cc |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 136 | v8utils.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 137 | variables.cc |
| 138 | version.cc |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 139 | store-buffer.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 140 | zone.cc |
Shimeng (Simon) Wang | 8a31eba | 2010-12-06 19:01:33 -0800 | [diff] [blame] | 141 | extensions/gc-extension.cc |
| 142 | extensions/externalize-string-extension.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 143 | """), |
| 144 | 'arch:arm': Split(""" |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 145 | arm/builtins-arm.cc |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 146 | arm/code-stubs-arm.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 147 | arm/codegen-arm.cc |
| 148 | arm/constants-arm.cc |
| 149 | arm/cpu-arm.cc |
| 150 | arm/debug-arm.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 151 | arm/deoptimizer-arm.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 152 | arm/disasm-arm.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 153 | arm/frames-arm.cc |
Leon Clarke | d91b9f7 | 2010-01-27 17:25:45 +0000 | [diff] [blame] | 154 | arm/full-codegen-arm.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 155 | arm/ic-arm.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 156 | arm/lithium-arm.cc |
| 157 | arm/lithium-codegen-arm.cc |
Ben Murdoch | e0cee9b | 2011-05-25 10:26:03 +0100 | [diff] [blame] | 158 | arm/lithium-gap-resolver-arm.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 159 | arm/macro-assembler-arm.cc |
| 160 | arm/regexp-macro-assembler-arm.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 161 | arm/stub-cache-arm.cc |
Leon Clarke | e46be81 | 2010-01-19 14:06:41 +0000 | [diff] [blame] | 162 | arm/assembler-arm.cc |
| 163 | """), |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 164 | 'arch:mips': Split(""" |
| 165 | mips/assembler-mips.cc |
| 166 | mips/builtins-mips.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 167 | mips/code-stubs-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 168 | mips/codegen-mips.cc |
| 169 | mips/constants-mips.cc |
| 170 | mips/cpu-mips.cc |
| 171 | mips/debug-mips.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 172 | mips/deoptimizer-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 173 | mips/disasm-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 174 | mips/frames-mips.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 175 | mips/full-codegen-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 176 | mips/ic-mips.cc |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 177 | mips/lithium-codegen-mips.cc |
| 178 | mips/lithium-gap-resolver-mips.cc |
| 179 | mips/lithium-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 180 | mips/macro-assembler-mips.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 181 | mips/regexp-macro-assembler-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 182 | mips/stub-cache-mips.cc |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 183 | """), |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 184 | 'arch:ia32': Split(""" |
| 185 | ia32/assembler-ia32.cc |
| 186 | ia32/builtins-ia32.cc |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 187 | ia32/code-stubs-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 188 | ia32/codegen-ia32.cc |
| 189 | ia32/cpu-ia32.cc |
| 190 | ia32/debug-ia32.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 191 | ia32/deoptimizer-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 192 | ia32/disasm-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 193 | ia32/frames-ia32.cc |
Leon Clarke | d91b9f7 | 2010-01-27 17:25:45 +0000 | [diff] [blame] | 194 | ia32/full-codegen-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 195 | ia32/ic-ia32.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 196 | ia32/lithium-codegen-ia32.cc |
Ben Murdoch | b8e0da2 | 2011-05-16 14:20:40 +0100 | [diff] [blame] | 197 | ia32/lithium-gap-resolver-ia32.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 198 | ia32/lithium-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 199 | ia32/macro-assembler-ia32.cc |
| 200 | ia32/regexp-macro-assembler-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 201 | ia32/stub-cache-ia32.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 202 | """), |
| 203 | 'arch:x64': Split(""" |
| 204 | x64/assembler-x64.cc |
| 205 | x64/builtins-x64.cc |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 206 | x64/code-stubs-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 207 | x64/codegen-x64.cc |
| 208 | x64/cpu-x64.cc |
| 209 | x64/debug-x64.cc |
Ben Murdoch | b0fe162 | 2011-05-05 13:52:32 +0100 | [diff] [blame] | 210 | x64/deoptimizer-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 211 | x64/disasm-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 212 | x64/frames-x64.cc |
Leon Clarke | d91b9f7 | 2010-01-27 17:25:45 +0000 | [diff] [blame] | 213 | x64/full-codegen-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 214 | x64/ic-x64.cc |
Ben Murdoch | b8e0da2 | 2011-05-16 14:20:40 +0100 | [diff] [blame] | 215 | x64/lithium-codegen-x64.cc |
Steve Block | 1e0659c | 2011-05-24 12:43:12 +0100 | [diff] [blame] | 216 | x64/lithium-gap-resolver-x64.cc |
| 217 | x64/lithium-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 218 | x64/macro-assembler-x64.cc |
| 219 | x64/regexp-macro-assembler-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 220 | x64/stub-cache-x64.cc |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 221 | """), |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 222 | 'simulator:arm': ['arm/simulator-arm.cc'], |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 223 | 'simulator:mips': ['mips/simulator-mips.cc'], |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 224 | 'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'], |
Steve Block | d0582a6 | 2009-12-15 09:54:21 +0000 | [diff] [blame] | 225 | 'os:openbsd': ['platform-openbsd.cc', 'platform-posix.cc'], |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 226 | 'os:linux': ['platform-linux.cc', 'platform-posix.cc'], |
| 227 | 'os:android': ['platform-linux.cc', 'platform-posix.cc'], |
| 228 | 'os:macos': ['platform-macos.cc', 'platform-posix.cc'], |
Leon Clarke | d91b9f7 | 2010-01-27 17:25:45 +0000 | [diff] [blame] | 229 | 'os:solaris': ['platform-solaris.cc', 'platform-posix.cc'], |
Ben Murdoch | e0cee9b | 2011-05-25 10:26:03 +0100 | [diff] [blame] | 230 | 'os:cygwin': ['platform-cygwin.cc', 'platform-posix.cc'], |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 231 | 'os:nullos': ['platform-nullos.cc'], |
Ben Murdoch | 589d697 | 2011-11-30 16:04:58 +0000 | [diff] [blame] | 232 | 'os:win32': ['platform-win32.cc', 'win32-math.cc'], |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 233 | 'mode:release': [], |
| 234 | 'mode:debug': [ |
Steve Block | 1e0659c | 2011-05-24 12:43:12 +0100 | [diff] [blame] | 235 | 'objects-debug.cc', 'prettyprinter.cc', 'regexp-macro-assembler-tracer.cc' |
| 236 | ] |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 240 | PREPARSER_SOURCES = { |
| 241 | 'all': Split(""" |
| 242 | allocation.cc |
Ben Murdoch | 589d697 | 2011-11-30 16:04:58 +0000 | [diff] [blame] | 243 | bignum.cc |
| 244 | bignum-dtoa.cc |
| 245 | cached-powers.cc |
| 246 | conversions.cc |
| 247 | diy-fp.cc |
| 248 | dtoa.cc |
| 249 | fast-dtoa.cc |
| 250 | fixed-dtoa.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 251 | preparse-data.cc |
| 252 | preparser.cc |
| 253 | preparser-api.cc |
Ben Murdoch | 589d697 | 2011-11-30 16:04:58 +0000 | [diff] [blame] | 254 | scanner.cc |
| 255 | strtod.cc |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 256 | token.cc |
| 257 | unicode.cc |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 258 | utils.cc |
Ben Murdoch | 589d697 | 2011-11-30 16:04:58 +0000 | [diff] [blame] | 259 | """), |
| 260 | 'os:win32': ['win32-math.cc'] |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 261 | } |
| 262 | |
| 263 | |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 264 | D8_LIGHT_FILES = { |
| 265 | 'all': [ |
| 266 | 'd8.cc' |
| 267 | ] |
| 268 | } |
| 269 | |
| 270 | |
| 271 | D8_FULL_FILES = { |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 272 | 'all': [ |
| 273 | 'd8.cc', 'd8-debug.cc' |
| 274 | ], |
| 275 | 'os:linux': [ |
| 276 | 'd8-posix.cc' |
| 277 | ], |
| 278 | 'os:macos': [ |
| 279 | 'd8-posix.cc' |
| 280 | ], |
| 281 | 'os:android': [ |
| 282 | 'd8-posix.cc' |
| 283 | ], |
| 284 | 'os:freebsd': [ |
| 285 | 'd8-posix.cc' |
| 286 | ], |
Steve Block | d0582a6 | 2009-12-15 09:54:21 +0000 | [diff] [blame] | 287 | 'os:openbsd': [ |
| 288 | 'd8-posix.cc' |
| 289 | ], |
Leon Clarke | d91b9f7 | 2010-01-27 17:25:45 +0000 | [diff] [blame] | 290 | 'os:solaris': [ |
| 291 | 'd8-posix.cc' |
| 292 | ], |
Ben Murdoch | e0cee9b | 2011-05-25 10:26:03 +0100 | [diff] [blame] | 293 | 'os:cygwin': [ |
| 294 | 'd8-posix.cc' |
| 295 | ], |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 296 | 'os:win32': [ |
| 297 | 'd8-windows.cc' |
| 298 | ], |
| 299 | 'os:nullos': [ |
| 300 | 'd8-windows.cc' # Empty implementation at the moment. |
| 301 | ], |
| 302 | 'console:readline': [ |
| 303 | 'd8-readline.cc' |
| 304 | ] |
| 305 | } |
| 306 | |
| 307 | |
| 308 | LIBRARY_FILES = ''' |
| 309 | runtime.js |
| 310 | v8natives.js |
| 311 | array.js |
| 312 | string.js |
| 313 | uri.js |
| 314 | math.js |
| 315 | messages.js |
| 316 | apinatives.js |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 317 | date.js |
| 318 | regexp.js |
| 319 | json.js |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 320 | liveedit-debugger.js |
Andrei Popescu | 3100271 | 2010-02-23 13:46:05 +0000 | [diff] [blame] | 321 | mirror-debugger.js |
| 322 | debug-debugger.js |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 323 | '''.split() |
| 324 | |
| 325 | |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 326 | EXPERIMENTAL_LIBRARY_FILES = ''' |
| 327 | proxy.js |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 328 | collection.js |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 329 | '''.split() |
| 330 | |
| 331 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 332 | def Abort(message): |
| 333 | print message |
| 334 | sys.exit(1) |
| 335 | |
| 336 | |
| 337 | def ConfigureObjectFiles(): |
Ben Murdoch | 8b112d2 | 2011-06-08 16:22:53 +0100 | [diff] [blame] | 338 | env = Environment(tools=tools) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 339 | env.Replace(**context.flags['v8']) |
| 340 | context.ApplyEnvOverrides(env) |
| 341 | env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C) |
Ben Murdoch | 6d7cb00 | 2011-08-04 19:25:22 +0100 | [diff] [blame] | 342 | env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGFILE" --log-snapshot-positions') |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 343 | |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 344 | def BuildJS2CEnv(type): |
| 345 | js2c_env = { 'TYPE': type, 'COMPRESSION': 'off' } |
| 346 | if 'COMPRESS_STARTUP_DATA_BZ2' in env['CPPDEFINES']: |
| 347 | js2c_env['COMPRESSION'] = 'bz2' |
| 348 | return js2c_env |
| 349 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 350 | # Build the standard platform-independent source files. |
| 351 | source_files = context.GetRelevantSources(SOURCES) |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 352 | d8_js = env.JS2C('d8-js.cc', 'd8.js', **{'TYPE': 'D8', 'COMPRESSION': 'off'}) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 353 | d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.']) |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 354 | if context.options['library'] == 'shared': |
| 355 | d8_files = context.GetRelevantSources(D8_LIGHT_FILES) |
| 356 | d8_objs = [] |
| 357 | else: |
| 358 | d8_files = context.GetRelevantSources(D8_FULL_FILES) |
| 359 | d8_objs = [d8_js_obj] |
Ben Murdoch | 69a99ed | 2011-11-30 16:03:39 +0000 | [diff] [blame] | 360 | d8_objs.append(context.ConfigureObject(d8_env, [d8_files])) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 361 | |
| 362 | # Combine the JavaScript library files into a single C++ file and |
| 363 | # compile it. |
| 364 | library_files = [s for s in LIBRARY_FILES] |
| 365 | library_files.append('macros.py') |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 366 | libraries_src = env.JS2C( |
| 367 | ['libraries.cc'], library_files, **BuildJS2CEnv('CORE')) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 368 | libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.']) |
| 369 | |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 370 | # Combine the experimental JavaScript library files into a C++ file |
| 371 | # and compile it. |
| 372 | experimental_library_files = [ s for s in EXPERIMENTAL_LIBRARY_FILES ] |
| 373 | experimental_library_files.append('macros.py') |
Ben Murdoch | 3fb3ca8 | 2011-12-02 17:19:32 +0000 | [diff] [blame] | 374 | experimental_libraries_src = env.JS2C(['experimental-libraries.cc'], |
| 375 | experimental_library_files, |
| 376 | **BuildJS2CEnv('EXPERIMENTAL')) |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 377 | experimental_libraries_obj = context.ConfigureObject(env, experimental_libraries_src, CPPPATH=['.']) |
| 378 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 379 | source_objs = context.ConfigureObject(env, source_files) |
Shimeng (Simon) Wang | 8a31eba | 2010-12-06 19:01:33 -0800 | [diff] [blame] | 380 | non_snapshot_files = [source_objs] |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 381 | |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 382 | preparser_source_files = context.GetRelevantSources(PREPARSER_SOURCES) |
| 383 | preparser_objs = context.ConfigureObject(env, preparser_source_files) |
| 384 | |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 385 | # Create snapshot if necessary. For cross compilation you should either |
| 386 | # do without snapshots and take the performance hit or you should build a |
| 387 | # host VM with the simulator=arm and snapshot=on options and then take the |
| 388 | # resulting snapshot.cc file from obj/release and put it in the src |
| 389 | # directory. Then rebuild the VM with the cross compiler and specify |
| 390 | # snapshot=nobuild on the scons command line. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 391 | empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc') |
| 392 | mksnapshot_env = env.Copy() |
| 393 | mksnapshot_env.Replace(**context.flags['mksnapshot']) |
| 394 | mksnapshot_src = 'mksnapshot.cc' |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 395 | mksnapshot = mksnapshot_env.Program('mksnapshot', [mksnapshot_src, libraries_obj, experimental_libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 396 | if context.use_snapshot: |
| 397 | if context.build_snapshot: |
| 398 | snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath) |
| 399 | else: |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 400 | snapshot_cc = 'snapshot.cc' |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 401 | snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 402 | else: |
| 403 | snapshot_obj = empty_snapshot_obj |
Ben Murdoch | 257744e | 2011-11-30 15:57:28 +0000 | [diff] [blame] | 404 | library_objs = [non_snapshot_files, libraries_obj, experimental_libraries_obj, snapshot_obj] |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 405 | return (library_objs, d8_objs, [mksnapshot], preparser_objs) |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 406 | |
| 407 | |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 408 | (library_objs, d8_objs, mksnapshot, preparser_objs) = ConfigureObjectFiles() |
| 409 | Return('library_objs d8_objs mksnapshot preparser_objs') |