OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The V8 project authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Please keep this file in sync with cctest.gyp. |
| 6 |
| 7 import("../../gni/v8.gni") |
| 8 |
| 9 executable("cctest") { |
| 10 testonly = true |
| 11 |
| 12 sources = [ |
| 13 "$target_gen_dir/resources.cc", |
| 14 "cctest.cc", |
| 15 "compiler/c-signature.h", |
| 16 "compiler/codegen-tester.cc", |
| 17 "compiler/codegen-tester.h", |
| 18 "compiler/function-tester.h", |
| 19 "compiler/graph-builder-tester.h", |
| 20 "compiler/test-basic-block-profiler.cc", |
| 21 "compiler/test-branch-combine.cc", |
| 22 "compiler/test-code-stub-assembler.cc", |
| 23 "compiler/test-gap-resolver.cc", |
| 24 "compiler/test-graph-visualizer.cc", |
| 25 "compiler/test-instruction.cc", |
| 26 "compiler/test-js-constant-cache.cc", |
| 27 "compiler/test-js-context-specialization.cc", |
| 28 "compiler/test-js-typed-lowering.cc", |
| 29 "compiler/test-jump-threading.cc", |
| 30 "compiler/test-linkage.cc", |
| 31 "compiler/test-loop-analysis.cc", |
| 32 "compiler/test-loop-assignment-analysis.cc", |
| 33 "compiler/test-machine-operator-reducer.cc", |
| 34 "compiler/test-multiple-return.cc", |
| 35 "compiler/test-node.cc", |
| 36 "compiler/test-operator.cc", |
| 37 "compiler/test-osr.cc", |
| 38 "compiler/test-representation-change.cc", |
| 39 "compiler/test-run-bytecode-graph-builder.cc", |
| 40 "compiler/test-run-calls-to-external-references.cc", |
| 41 "compiler/test-run-deopt.cc", |
| 42 "compiler/test-run-inlining.cc", |
| 43 "compiler/test-run-intrinsics.cc", |
| 44 "compiler/test-run-jsbranches.cc", |
| 45 "compiler/test-run-jscalls.cc", |
| 46 "compiler/test-run-jsexceptions.cc", |
| 47 "compiler/test-run-jsobjects.cc", |
| 48 "compiler/test-run-jsops.cc", |
| 49 "compiler/test-run-load-store.cc", |
| 50 "compiler/test-run-machops.cc", |
| 51 "compiler/test-run-native-calls.cc", |
| 52 "compiler/test-run-stackcheck.cc", |
| 53 "compiler/test-run-stubs.cc", |
| 54 "compiler/test-run-variables.cc", |
| 55 "compiler/test-run-wasm-machops.cc", |
| 56 "compiler/test-simplified-lowering.cc", |
| 57 "expression-type-collector.cc", |
| 58 "expression-type-collector.h", |
| 59 "gay-fixed.cc", |
| 60 "gay-precision.cc", |
| 61 "gay-shortest.cc", |
| 62 "heap/heap-tester.h", |
| 63 "heap/heap-utils.cc", |
| 64 "heap/heap-utils.h", |
| 65 "heap/test-alloc.cc", |
| 66 "heap/test-compaction.cc", |
| 67 "heap/test-heap.cc", |
| 68 "heap/test-incremental-marking.cc", |
| 69 "heap/test-lab.cc", |
| 70 "heap/test-mark-compact.cc", |
| 71 "heap/test-spaces.cc", |
| 72 "interpreter/bytecode-expectations-printer.cc", |
| 73 "interpreter/bytecode-expectations-printer.h", |
| 74 "interpreter/interpreter-tester.cc", |
| 75 "interpreter/test-bytecode-generator.cc", |
| 76 "interpreter/test-interpreter-intrinsics.cc", |
| 77 "interpreter/test-interpreter.cc", |
| 78 "libsampler/test-sampler.cc", |
| 79 "print-extension.cc", |
| 80 "profiler-extension.cc", |
| 81 "test-accessors.cc", |
| 82 "test-api-accessors.cc", |
| 83 "test-api-fast-accessor-builder.cc", |
| 84 "test-api-interceptors.cc", |
| 85 "test-api.cc", |
| 86 "test-api.h", |
| 87 "test-array-list.cc", |
| 88 "test-asm-validator.cc", |
| 89 "test-ast-expression-visitor.cc", |
| 90 "test-ast.cc", |
| 91 "test-atomicops.cc", |
| 92 "test-bignum-dtoa.cc", |
| 93 "test-bignum.cc", |
| 94 "test-bit-vector.cc", |
| 95 "test-circular-queue.cc", |
| 96 "test-compiler.cc", |
| 97 "test-constantpool.cc", |
| 98 "test-conversions.cc", |
| 99 "test-cpu-profiler.cc", |
| 100 "test-date.cc", |
| 101 "test-debug.cc", |
| 102 "test-decls.cc", |
| 103 "test-deoptimization.cc", |
| 104 "test-dictionary.cc", |
| 105 "test-diy-fp.cc", |
| 106 "test-double.cc", |
| 107 "test-dtoa.cc", |
| 108 "test-elements-kind.cc", |
| 109 "test-fast-dtoa.cc", |
| 110 "test-feedback-vector.cc", |
| 111 "test-field-type-tracking.cc", |
| 112 "test-fixed-dtoa.cc", |
| 113 "test-flags.cc", |
| 114 "test-func-name-inference.cc", |
| 115 "test-global-handles.cc", |
| 116 "test-global-object.cc", |
| 117 "test-hashing.cc", |
| 118 "test-hashmap.cc", |
| 119 "test-heap-profiler.cc", |
| 120 "test-hydrogen-types.cc", |
| 121 "test-identity-map.cc", |
| 122 "test-inobject-slack-tracking.cc", |
| 123 "test-list.cc", |
| 124 "test-liveedit.cc", |
| 125 "test-lockers.cc", |
| 126 "test-log.cc", |
| 127 "test-mementos.cc", |
| 128 "test-parsing.cc", |
| 129 "test-platform.cc", |
| 130 "test-profile-generator.cc", |
| 131 "test-random-number-generator.cc", |
| 132 "test-receiver-check-hidden-prototype.cc", |
| 133 "test-regexp.cc", |
| 134 "test-reloc-info.cc", |
| 135 "test-representation.cc", |
| 136 "test-sampler-api.cc", |
| 137 "test-serialize.cc", |
| 138 "test-simd.cc", |
| 139 "test-strings.cc", |
| 140 "test-strtod.cc", |
| 141 "test-symbols.cc", |
| 142 "test-thread-termination.cc", |
| 143 "test-threads.cc", |
| 144 "test-trace-event.cc", |
| 145 "test-transitions.cc", |
| 146 "test-typedarrays.cc", |
| 147 "test-types.cc", |
| 148 "test-unbound-queue.cc", |
| 149 "test-unboxed-doubles.cc", |
| 150 "test-unique.cc", |
| 151 "test-unscopables-hidden-prototype.cc", |
| 152 "test-utils.cc", |
| 153 "test-version.cc", |
| 154 "test-weakmaps.cc", |
| 155 "test-weaksets.cc", |
| 156 "trace-extension.cc", |
| 157 "wasm/test-run-wasm-64.cc", |
| 158 "wasm/test-run-wasm-asmjs.cc", |
| 159 "wasm/test-run-wasm-interpreter.cc", |
| 160 "wasm/test-run-wasm-js.cc", |
| 161 "wasm/test-run-wasm-module.cc", |
| 162 "wasm/test-run-wasm.cc", |
| 163 "wasm/test-signatures.h", |
| 164 "wasm/test-wasm-function-name-table.cc", |
| 165 "wasm/test-wasm-stack.cc", |
| 166 "wasm/test-wasm-trap-position.cc", |
| 167 "wasm/wasm-run-utils.h", |
| 168 ] |
| 169 |
| 170 if (v8_target_arch == "arm") { |
| 171 sources += [ |
| 172 "test-assembler-arm.cc", |
| 173 "test-code-stubs-arm.cc", |
| 174 "test-code-stubs.cc", |
| 175 "test-disasm-arm.cc", |
| 176 "test-macro-assembler-arm.cc", |
| 177 "test-run-wasm-relocation-arm.cc", |
| 178 ] |
| 179 } else if (v8_target_arch == "arm64") { |
| 180 sources += [ |
| 181 "test-assembler-arm64.cc", |
| 182 "test-code-stubs-arm64.cc", |
| 183 "test-code-stubs.cc", |
| 184 "test-disasm-arm64.cc", |
| 185 "test-fuzz-arm64.cc", |
| 186 "test-javascript-arm64.cc", |
| 187 "test-js-arm64-variables.cc", |
| 188 "test-run-wasm-relocation-arm64.cc", |
| 189 "test-utils-arm64.cc", |
| 190 ] |
| 191 } else if (v8_target_arch == "ia32") { |
| 192 sources += [ |
| 193 "test-assembler-ia32.cc", |
| 194 "test-code-stubs-ia32.cc", |
| 195 "test-code-stubs.cc", |
| 196 "test-disasm-ia32.cc", |
| 197 "test-log-stack-tracer.cc", |
| 198 "test-macro-assembler-ia32.cc", |
| 199 "test-run-wasm-relocation-ia32.cc", |
| 200 ] |
| 201 } else if (v8_target_arch == "mips") { |
| 202 sources += [ |
| 203 "test-assembler-mips.cc", |
| 204 "test-code-stubs-mips.cc", |
| 205 "test-code-stubs.cc", |
| 206 "test-disasm-mips.cc", |
| 207 "test-macro-assembler-mips.cc", |
| 208 ] |
| 209 } else if (v8_target_arch == "mipsel") { |
| 210 sources += [ |
| 211 "test-assembler-mips.cc", |
| 212 "test-code-stubs-mips.cc", |
| 213 "test-code-stubs.cc", |
| 214 "test-disasm-mips.cc", |
| 215 "test-macro-assembler-mips.cc", |
| 216 ] |
| 217 } else if (v8_target_arch == "mips64") { |
| 218 sources += [ |
| 219 "test-assembler-mips64.cc", |
| 220 "test-code-stubs-mips64.cc", |
| 221 "test-code-stubs.cc", |
| 222 "test-disasm-mips64.cc", |
| 223 "test-macro-assembler-mips64.cc", |
| 224 ] |
| 225 } else if (v8_target_arch == "mips64el") { |
| 226 sources += [ |
| 227 "test-assembler-mips64.cc", |
| 228 "test-code-stubs-mips64.cc", |
| 229 "test-code-stubs.cc", |
| 230 "test-disasm-mips64.cc", |
| 231 "test-macro-assembler-mips64.cc", |
| 232 ] |
| 233 } else if (v8_target_arch == "x64") { |
| 234 sources += [ |
| 235 "test-assembler-x64.cc", |
| 236 "test-code-stubs-x64.cc", |
| 237 "test-code-stubs.cc", |
| 238 "test-disasm-x64.cc", |
| 239 "test-log-stack-tracer.cc", |
| 240 "test-macro-assembler-x64.cc", |
| 241 "test-run-wasm-relocation-x64.cc", |
| 242 ] |
| 243 } else if (v8_target_arch == "x87") { |
| 244 sources += [ |
| 245 "test-assembler-x87.cc", |
| 246 "test-code-stubs-x87.cc", |
| 247 "test-code-stubs.cc", |
| 248 "test-disasm-x87.cc", |
| 249 "test-log-stack-tracer.cc", |
| 250 "test-macro-assembler-x87.cc", |
| 251 "test-run-wasm-relocation-x87.cc", |
| 252 ] |
| 253 } else if (v8_target_arch == "ppc" || v8_target_arch == "ppc64") { |
| 254 sources += [ |
| 255 "test-assembler-ppc.cc", |
| 256 "test-code-stubs.cc", |
| 257 "test-disasm-ppc.cc", |
| 258 ] |
| 259 } else if (v8_target_arch == "s390" || v8_target_arch == "s390x") { |
| 260 sources += [ |
| 261 "test-assembler-s390.cc", |
| 262 "test-code-stubs.cc", |
| 263 "test-disasm-s390.cc", |
| 264 ] |
| 265 } |
| 266 |
| 267 if (is_linux) { |
| 268 # TODO(machenbach): Translate 'or OS=="qnx"' from gyp. |
| 269 sources += [ "test-platform-linux.cc" ] |
| 270 } else if (is_win) { |
| 271 sources += [ "test-platform-win32.cc" ] |
| 272 # TODO(machenbach): Translate from gyp. |
| 273 # "msvs_settings": { |
| 274 # "VCCLCompilerTool": { |
| 275 # # MSVS wants this for gay-{precision,shortest}.cc. |
| 276 # "AdditionalOptions": ["/bigobj"], |
| 277 # }, |
| 278 # }, |
| 279 } |
| 280 |
| 281 configs -= [ "//build/config/compiler:chromium_code" ] |
| 282 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 283 configs += [ |
| 284 "../..:external_config", |
| 285 "../..:internal_config_base", |
| 286 "../..:features", |
| 287 "../..:toolchain", |
| 288 ] |
| 289 |
| 290 # TODO(machenbach): Translate from gyp. |
| 291 #['v8_target_arch=="ppc" or v8_target_arch=="ppc64" \ |
| 292 # or v8_target_arch=="arm" or v8_target_arch=="arm64" \ |
| 293 # or v8_target_arch=="s390" or v8_target_arch=="s390x"', { |
| 294 # # disable fmadd/fmsub so that expected results match generated code in |
| 295 # # RunFloat64MulAndFloat64Add1 and friends. |
| 296 # 'cflags': ['-ffp-contract=off'], |
| 297 #}], |
| 298 |
| 299 # TODO(machenbach): Translate from gyp. |
| 300 #["OS=="aix"", { |
| 301 # "ldflags": [ "-Wl,-bbigtoc" ], |
| 302 #}], |
| 303 |
| 304 deps = [ |
| 305 ":resources", |
| 306 "../..:v8_libplatform", |
| 307 "//build/config/sanitizers:deps", |
| 308 "//build/win:default_exe_manifest", |
| 309 ] |
| 310 |
| 311 if (is_component_build) { |
| 312 # cctest can't be built against a shared library, so we |
| 313 # need to depend on the underlying static target in that case. |
| 314 deps += [ "../..:v8_maybe_snapshot" ] |
| 315 } else { |
| 316 deps += [ "../..:v8" ] |
| 317 } |
| 318 } |
| 319 |
| 320 action("resources") { |
| 321 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 322 |
| 323 script = "../../tools/js2c.py" |
| 324 |
| 325 # The script depends on this other script, this rule causes a rebuild if it |
| 326 # changes. |
| 327 inputs = [ |
| 328 "../../tools/jsmin.py", |
| 329 ] |
| 330 |
| 331 # NOSORT |
| 332 sources = [ |
| 333 "../../tools/splaytree.js", |
| 334 "../../tools/codemap.js", |
| 335 "../../tools/csvparser.js", |
| 336 "../../tools/consarray.js", |
| 337 "../../tools/profile.js", |
| 338 "../../tools/profile_view.js", |
| 339 "../../tools/logreader.js", |
| 340 "log-eq-of-logging-and-traversal.js", |
| 341 ] |
| 342 |
| 343 outputs = [ |
| 344 "$target_gen_dir/resources.cc", |
| 345 ] |
| 346 |
| 347 args = [ |
| 348 rebase_path("$target_gen_dir/resources.cc", root_build_dir), |
| 349 "TEST", |
| 350 ] |
| 351 args += rebase_path(sources, root_build_dir) |
| 352 } |
| 353 # TODO(machenbach): Migrate generate-bytecode-expectations. |
OLD | NEW |