BUILD.gn 17.8 KB
Newer Older
machenbach's avatar
machenbach committed
1 2 3 4 5 6
# Copyright 2016 The V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("../../gni/v8.gni")

7 8 9
if (is_fuchsia) {
  import("//build/config/fuchsia/rules.gni")

10
  cr_fuchsia_package("v8_unittests_pkg") {
11
    testonly = true
12 13 14
    binary = ":unittests"
    manifest = "../../gni/v8.cmx"
    package_name_override = "v8_unittests"
15 16 17 18
  }

  fuchsia_package_runner("v8_unittests_fuchsia") {
    testonly = true
19
    use_cfv2 = false
20
    package = ":v8_unittests_pkg"
21
    package_name_override = "v8_unittests"
22 23 24
  }
}

25
v8_executable("v8_heap_base_unittests") {
26 27 28 29 30 31 32 33 34 35
  testonly = true

  configs = [
    "../..:external_config",
    "../..:internal_config_base",
  ]

  sources = [ "heap/base/run-all-unittests.cc" ]

  deps = [
36
    ":v8_heap_base_unittests_sources",
37 38 39 40 41
    "//testing/gmock",
    "//testing/gtest",
  ]
}

42
v8_source_set("v8_heap_base_unittests_sources") {
43 44
  testonly = true

45 46 47 48
  sources = [
    "heap/base/active-system-pages-unittest.cc",
    "heap/base/worklist-unittest.cc",
  ]
49 50 51 52 53 54 55

  configs = [
    "../..:external_config",
    "../..:internal_config_base",
  ]

  deps = [
56
    "../..:v8_heap_base_for_testing",
57 58 59 60 61
    "//testing/gmock",
    "//testing/gtest",
  ]
}

Michael Lippautz's avatar
Michael Lippautz committed
62 63 64
# Stand-alone target for C++ GC unittests. This is used to ensure that it
# builds without V8 as well. They are also included in the regular unittests
# target for simplicity.
Omer Katz's avatar
Omer Katz committed
65 66 67
if (cppgc_is_standalone) {
  v8_executable("cppgc_unittests") {
    testonly = true
Brice Dobry's avatar
Brice Dobry committed
68 69 70
    if (v8_current_cpu == "riscv64") {
      libs = [ "atomic" ]
    }
Michael Lippautz's avatar
Michael Lippautz committed
71

Omer Katz's avatar
Omer Katz committed
72 73 74 75
    configs = [
      "../..:external_config",
      "../..:internal_config_base",
    ]
Michael Lippautz's avatar
Michael Lippautz committed
76

Omer Katz's avatar
Omer Katz committed
77
    sources = [ "heap/cppgc/run-all-unittests.cc" ]
Michael Lippautz's avatar
Michael Lippautz committed
78

Omer Katz's avatar
Omer Katz committed
79 80
    deps = [
      ":cppgc_unittests_sources",
81
      ":v8_heap_base_unittests_sources",
Omer Katz's avatar
Omer Katz committed
82 83 84 85 86
      "../..:cppgc_for_testing",
      "//testing/gmock",
      "//testing/gtest",
    ]
  }
Michael Lippautz's avatar
Michael Lippautz committed
87 88 89 90 91
}

v8_source_set("cppgc_unittests_sources") {
  testonly = true

92
  sources = [
93
    "heap/cppgc/allocation-unittest.cc",
94
    "heap/cppgc/compactor-unittest.cc",
95
    "heap/cppgc/concurrent-marking-unittest.cc",
96
    "heap/cppgc/concurrent-sweeper-unittest.cc",
97
    "heap/cppgc/cross-thread-persistent-unittest.cc",
98
    "heap/cppgc/custom-spaces-unittest.cc",
99
    "heap/cppgc/ephemeron-pair-unittest.cc",
100
    "heap/cppgc/explicit-management-unittest.cc",
101 102 103 104
    "heap/cppgc/finalizer-trait-unittest.cc",
    "heap/cppgc/free-list-unittest.cc",
    "heap/cppgc/garbage-collected-unittest.cc",
    "heap/cppgc/gc-info-unittest.cc",
105 106
    "heap/cppgc/gc-invoker-unittest.cc",
    "heap/cppgc/heap-growing-unittest.cc",
107 108
    "heap/cppgc/heap-object-header-unittest.cc",
    "heap/cppgc/heap-page-unittest.cc",
109
    "heap/cppgc/heap-registry-unittest.cc",
110
    "heap/cppgc/heap-statistics-collector-unittest.cc",
111
    "heap/cppgc/heap-unittest.cc",
112
    "heap/cppgc/incremental-marking-schedule-unittest.cc",
113
    "heap/cppgc/liveness-broker-unittest.cc",
114 115
    "heap/cppgc/logging-unittest.cc",
    "heap/cppgc/marker-unittest.cc",
116
    "heap/cppgc/marking-verifier-unittest.cc",
117 118
    "heap/cppgc/marking-visitor-unittest.cc",
    "heap/cppgc/member-unittest.cc",
Omer Katz's avatar
Omer Katz committed
119
    "heap/cppgc/metric-recorder-unittest.cc",
120
    "heap/cppgc/minor-gc-unittest.cc",
121
    "heap/cppgc/name-trait-unittest.cc",
122
    "heap/cppgc/object-size-trait-unittest.cc",
123
    "heap/cppgc/object-start-bitmap-unittest.cc",
124
    "heap/cppgc/page-memory-unittest.cc",
125
    "heap/cppgc/persistent-family-unittest.cc",
126
    "heap/cppgc/platform-unittest.cc",
127
    "heap/cppgc/prefinalizer-unittest.cc",
128
    "heap/cppgc/sanitizer-unittest.cc",
129 130
    "heap/cppgc/source-location-unittest.cc",
    "heap/cppgc/stack-unittest.cc",
Omer Katz's avatar
Omer Katz committed
131
    "heap/cppgc/stats-collector-scopes-unittest.cc",
132
    "heap/cppgc/stats-collector-unittest.cc",
133
    "heap/cppgc/sweeper-unittest.cc",
134 135
    "heap/cppgc/test-platform.cc",
    "heap/cppgc/test-platform.h",
136
    "heap/cppgc/testing-unittest.cc",
137 138
    "heap/cppgc/tests.cc",
    "heap/cppgc/tests.h",
139
    "heap/cppgc/visitor-unittest.cc",
140
    "heap/cppgc/weak-container-unittest.cc",
141
    "heap/cppgc/workloads-unittest.cc",
142
    "heap/cppgc/write-barrier-unittest.cc",
143
  ]
Michael Lippautz's avatar
Michael Lippautz committed
144 145 146 147

  configs = [
    "../..:external_config",
    "../..:internal_config_base",
148
    "../..:cppgc_base_config",
Michael Lippautz's avatar
Michael Lippautz committed
149 150 151 152 153 154
  ]

  deps = [
    "//testing/gmock",
    "//testing/gtest",
  ]
155

156 157 158 159 160 161 162
  if (cppgc_is_standalone) {
    deps += [ "../..:cppgc_for_testing" ]
  } else {
    deps += [
      "../..:v8_for_testing",
      "../..:v8_tracing",
    ]
163
  }
Michael Lippautz's avatar
Michael Lippautz committed
164 165
}

166
v8_executable("unittests") {
machenbach's avatar
machenbach committed
167 168
  testonly = true

169 170 171
  if (current_os == "aix") {
    ldflags = [ "-Wl,-bbigtoc" ]
  }
172 173 174

  deps = [
    ":unittests_sources",
175
    ":v8_heap_base_unittests_sources",
176 177 178 179
    "../..:v8_for_testing",
    "../..:v8_libbase",
    "../..:v8_libplatform",
    "//build/win:default_exe_manifest",
180 181
    "//testing/gmock",
    "//testing/gtest",
182 183
  ]

Omer Katz's avatar
Omer Katz committed
184 185 186 187
  if (!cppgc_is_standalone) {
    deps += [ ":cppgc_unittests_sources" ]
  }

188
  data_deps = [ "../../tools:v8_testrunner" ]
189 190 191 192 193 194

  data = [
    "testcfg.py",
    "unittests.status",
  ]

195 196 197 198 199
  configs = [
    "../..:external_config",
    "../..:internal_config_base",
  ]
}
200

201 202 203
v8_source_set("unittests_sources") {
  testonly = true

jochen's avatar
jochen committed
204
  sources = [
205
    "../../test/common/assembler-tester.h",
206 207
    "../../testing/gmock-support.h",
    "../../testing/gtest-support.h",
208
    "api/access-check-unittest.cc",
209
    "api/deserialize-unittest.cc",
210
    "api/exception-unittest.cc",
211
    "api/interceptor-unittest.cc",
212
    "api/isolate-unittest.cc",
213
    "api/remote-object-unittest.cc",
214
    "api/resource-constraints-unittest.cc",
215
    "api/v8-object-unittest.cc",
216
    "base/address-region-unittest.cc",
jochen's avatar
jochen committed
217 218 219 220 221 222 223 224 225
    "base/atomic-utils-unittest.cc",
    "base/bits-unittest.cc",
    "base/cpu-unittest.cc",
    "base/division-by-constant-unittest.cc",
    "base/flags-unittest.cc",
    "base/functional-unittest.cc",
    "base/ieee754-unittest.cc",
    "base/iterator-unittest.cc",
    "base/logging-unittest.cc",
226
    "base/macros-unittest.cc",
227
    "base/ostreams-unittest.cc",
jochen's avatar
jochen committed
228 229 230 231 232
    "base/platform/condition-variable-unittest.cc",
    "base/platform/mutex-unittest.cc",
    "base/platform/platform-unittest.cc",
    "base/platform/semaphore-unittest.cc",
    "base/platform/time-unittest.cc",
233
    "base/region-allocator-unittest.cc",
jochen's avatar
jochen committed
234
    "base/sys-info-unittest.cc",
235
    "base/template-utils-unittest.cc",
236
    "base/threaded-list-unittest.cc",
jochen's avatar
jochen committed
237
    "base/utils/random-number-generator-unittest.cc",
238
    "base/vector-unittest.cc",
239
    "base/virtual-address-space-unittest.cc",
240
    "base/vlq-base64-unittest.cc",
241
    "base/vlq-unittest.cc",
242
    "codegen/aligned-slot-allocator-unittest.cc",
Yang Guo's avatar
Yang Guo committed
243 244 245 246
    "codegen/code-stub-assembler-unittest.cc",
    "codegen/code-stub-assembler-unittest.h",
    "codegen/register-configuration-unittest.cc",
    "codegen/source-position-table-unittest.cc",
247
    "compiler-dispatcher/compiler-dispatcher-unittest.cc",
248
    "compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc",
249 250 251 252 253
    "compiler/backend/instruction-selector-unittest.cc",
    "compiler/backend/instruction-selector-unittest.h",
    "compiler/backend/instruction-sequence-unittest.cc",
    "compiler/backend/instruction-sequence-unittest.h",
    "compiler/backend/instruction-unittest.cc",
jochen's avatar
jochen committed
254
    "compiler/branch-elimination-unittest.cc",
255
    "compiler/bytecode-analysis-unittest.cc",
jochen's avatar
jochen committed
256 257 258 259
    "compiler/checkpoint-elimination-unittest.cc",
    "compiler/common-operator-reducer-unittest.cc",
    "compiler/common-operator-unittest.cc",
    "compiler/compiler-test-utils.h",
260
    "compiler/constant-folding-reducer-unittest.cc",
jochen's avatar
jochen committed
261 262
    "compiler/control-equivalence-unittest.cc",
    "compiler/control-flow-optimizer-unittest.cc",
263
    "compiler/csa-load-elimination-unittest.cc",
jochen's avatar
jochen committed
264
    "compiler/dead-code-elimination-unittest.cc",
265
    "compiler/decompression-optimizer-unittest.cc",
jochen's avatar
jochen committed
266 267
    "compiler/diamond-unittest.cc",
    "compiler/effect-control-linearizer-unittest.cc",
268
    "compiler/frame-unittest.cc",
jochen's avatar
jochen committed
269 270 271 272 273
    "compiler/graph-reducer-unittest.cc",
    "compiler/graph-reducer-unittest.h",
    "compiler/graph-trimmer-unittest.cc",
    "compiler/graph-unittest.cc",
    "compiler/graph-unittest.h",
274
    "compiler/js-call-reducer-unittest.cc",
jochen's avatar
jochen committed
275 276
    "compiler/js-create-lowering-unittest.cc",
    "compiler/js-intrinsic-lowering-unittest.cc",
277
    "compiler/js-native-context-specialization-unittest.cc",
jochen's avatar
jochen committed
278 279 280 281 282 283 284 285 286 287 288 289 290 291
    "compiler/js-operator-unittest.cc",
    "compiler/js-typed-lowering-unittest.cc",
    "compiler/linkage-tail-call-unittest.cc",
    "compiler/load-elimination-unittest.cc",
    "compiler/loop-peeling-unittest.cc",
    "compiler/machine-operator-reducer-unittest.cc",
    "compiler/machine-operator-unittest.cc",
    "compiler/node-cache-unittest.cc",
    "compiler/node-matchers-unittest.cc",
    "compiler/node-properties-unittest.cc",
    "compiler/node-test-utils.cc",
    "compiler/node-test-utils.h",
    "compiler/node-unittest.cc",
    "compiler/opcodes-unittest.cc",
292
    "compiler/persistent-unittest.cc",
293
    "compiler/redundancy-elimination-unittest.cc",
294
    "compiler/regalloc/live-range-unittest.cc",
295
    "compiler/regalloc/mid-tier-register-allocator-unittest.cc",
296 297
    "compiler/regalloc/move-optimizer-unittest.cc",
    "compiler/regalloc/register-allocator-unittest.cc",
jochen's avatar
jochen committed
298 299 300
    "compiler/schedule-unittest.cc",
    "compiler/scheduler-rpo-unittest.cc",
    "compiler/scheduler-unittest.cc",
301
    "compiler/simplified-lowering-unittest.cc",
jochen's avatar
jochen committed
302 303 304 305 306 307
    "compiler/simplified-operator-reducer-unittest.cc",
    "compiler/simplified-operator-unittest.cc",
    "compiler/state-values-utils-unittest.cc",
    "compiler/typed-optimization-unittest.cc",
    "compiler/typer-unittest.cc",
    "compiler/value-numbering-reducer-unittest.cc",
308
    "compiler/zone-stats-unittest.cc",
Yang Guo's avatar
Yang Guo committed
309
    "date/date-cache-unittest.cc",
310
    "debug/debug-property-iterator-unittest.cc",
Yang Guo's avatar
Yang Guo committed
311 312
    "diagnostics/eh-frame-iterator-unittest.cc",
    "diagnostics/eh-frame-writer-unittest.cc",
313
    "diagnostics/gdb-jit-unittest.cc",
Yang Guo's avatar
Yang Guo committed
314
    "execution/microtask-queue-unittest.cc",
315
    "heap/allocation-observer-unittest.cc",
316
    "heap/bitmap-test-utils.h",
jochen's avatar
jochen committed
317
    "heap/bitmap-unittest.cc",
318
    "heap/code-object-registry-unittest.cc",
319 320 321 322 323
    "heap/cppgc-js/traced-reference-unittest.cc",
    "heap/cppgc-js/unified-heap-snapshot-unittest.cc",
    "heap/cppgc-js/unified-heap-unittest.cc",
    "heap/cppgc-js/unified-heap-utils.cc",
    "heap/cppgc-js/unified-heap-utils.h",
324
    "heap/embedder-tracing-unittest.cc",
jochen's avatar
jochen committed
325 326
    "heap/gc-idle-time-handler-unittest.cc",
    "heap/gc-tracer-unittest.cc",
327
    "heap/heap-controller-unittest.cc",
jochen's avatar
jochen committed
328
    "heap/heap-unittest.cc",
329
    "heap/heap-utils.cc",
330
    "heap/heap-utils.h",
331
    "heap/index-generator-unittest.cc",
332
    "heap/lab-unittest.cc",
333
    "heap/list-unittest.cc",
334
    "heap/local-factory-unittest.cc",
335
    "heap/local-heap-unittest.cc",
jochen's avatar
jochen committed
336
    "heap/marking-unittest.cc",
337
    "heap/marking-worklist-unittest.cc",
jochen's avatar
jochen committed
338
    "heap/memory-reducer-unittest.cc",
339
    "heap/object-stats-unittest.cc",
340
    "heap/persistent-handles-unittest.cc",
341
    "heap/progressbar-unittest.cc",
342
    "heap/safepoint-unittest.cc",
jochen's avatar
jochen committed
343
    "heap/slot-set-unittest.cc",
344
    "heap/spaces-unittest.cc",
345
    "heap/unmapper-unittest.cc",
jochen's avatar
jochen committed
346 347
    "interpreter/bytecode-array-builder-unittest.cc",
    "interpreter/bytecode-array-iterator-unittest.cc",
348
    "interpreter/bytecode-array-random-iterator-unittest.cc",
349
    "interpreter/bytecode-array-writer-unittest.cc",
jochen's avatar
jochen committed
350
    "interpreter/bytecode-decoder-unittest.cc",
351
    "interpreter/bytecode-node-unittest.cc",
352
    "interpreter/bytecode-operands-unittest.cc",
jochen's avatar
jochen committed
353 354
    "interpreter/bytecode-register-allocator-unittest.cc",
    "interpreter/bytecode-register-optimizer-unittest.cc",
355
    "interpreter/bytecode-source-info-unittest.cc",
356
    "interpreter/bytecode-utils.h",
jochen's avatar
jochen committed
357 358 359 360
    "interpreter/bytecodes-unittest.cc",
    "interpreter/constant-array-builder-unittest.cc",
    "interpreter/interpreter-assembler-unittest.cc",
    "interpreter/interpreter-assembler-unittest.h",
361
    "libplatform/default-job-unittest.cc",
jochen's avatar
jochen committed
362
    "libplatform/default-platform-unittest.cc",
363
    "libplatform/default-worker-threads-task-runner-unittest.cc",
364
    "libplatform/single-threaded-default-platform-unittest.cc",
jochen's avatar
jochen committed
365 366
    "libplatform/task-queue-unittest.cc",
    "libplatform/worker-thread-unittest.cc",
Yang Guo's avatar
Yang Guo committed
367 368 369 370
    "logging/counters-unittest.cc",
    "numbers/bigint-unittest.cc",
    "numbers/conversions-unittest.cc",
    "objects/object-unittest.cc",
371
    "objects/osr-optimized-code-cache-unittest.cc",
372
    "objects/swiss-hash-table-helpers-unittest.cc",
Yang Guo's avatar
Yang Guo committed
373
    "objects/value-serializer-unittest.cc",
374
    "objects/weakarraylist-unittest.cc",
375
    "parser/ast-value-unittest.cc",
376
    "parser/preparser-unittest.cc",
Yang Guo's avatar
Yang Guo committed
377
    "profiler/strings-storage-unittest.cc",
378
    "regexp/regexp-unittest.cc",
379
    "regress/regress-crbug-1041240-unittest.cc",
380
    "regress/regress-crbug-1056054-unittest.cc",
381
    "regress/regress-crbug-938251-unittest.cc",
jochen's avatar
jochen committed
382
    "run-all-unittests.cc",
383
    "runtime/runtime-debug-unittest.cc",
Samuel Groß's avatar
Samuel Groß committed
384
    "sandbox/sandbox-unittest.cc",
Yang Guo's avatar
Yang Guo committed
385 386 387 388
    "strings/char-predicates-unittest.cc",
    "strings/unicode-unittest.cc",
    "tasks/background-compile-task-unittest.cc",
    "tasks/cancelable-tasks-unittest.cc",
389 390
    "test-helpers.cc",
    "test-helpers.h",
jochen's avatar
jochen committed
391 392
    "test-utils.cc",
    "test-utils.h",
393
    "torque/earley-parser-unittest.cc",
394 395
    "torque/ls-json-unittest.cc",
    "torque/ls-message-unittest.cc",
396
    "torque/ls-server-data-unittest.cc",
397
    "torque/torque-unittest.cc",
398
    "torque/torque-utils-unittest.cc",
Yang Guo's avatar
Yang Guo committed
399 400 401 402
    "utils/allocation-unittest.cc",
    "utils/detachable-vector-unittest.cc",
    "utils/locked-queue-unittest.cc",
    "utils/utils-unittest.cc",
403
    "zone/zone-allocator-unittest.cc",
404
    "zone/zone-chunk-list-unittest.cc",
405
    "zone/zone-unittest.cc",
jochen's avatar
jochen committed
406
  ]
machenbach's avatar
machenbach committed
407

408 409 410 411
  if (v8_enable_runtime_call_stats) {
    sources += [ "logging/runtime-call-stats-unittest.cc" ]
  }

412 413
  if (v8_enable_webassembly) {
    sources += [
414
      "../../test/common/wasm/wasm-macro-gen.h",
415 416
      "asmjs/asm-scanner-unittest.cc",
      "asmjs/asm-types-unittest.cc",
417 418
      "compiler/int64-lowering-unittest.cc",
      "objects/wasm-backing-store-unittest.cc",
419 420 421 422
      "wasm/control-transfer-unittest.cc",
      "wasm/decoder-unittest.cc",
      "wasm/function-body-decoder-unittest.cc",
      "wasm/leb-helper-unittest.cc",
423
      "wasm/liftoff-register-unittests.cc",
424
      "wasm/loop-assignment-analysis-unittest.cc",
425
      "wasm/memory-protection-unittest.cc",
426 427 428 429 430 431 432 433 434 435
      "wasm/module-decoder-memory64-unittest.cc",
      "wasm/module-decoder-unittest.cc",
      "wasm/simd-shuffle-unittest.cc",
      "wasm/streaming-decoder-unittest.cc",
      "wasm/subtyping-unittest.cc",
      "wasm/wasm-code-manager-unittest.cc",
      "wasm/wasm-compiler-unittest.cc",
      "wasm/wasm-macro-gen-unittest.cc",
      "wasm/wasm-module-builder-unittest.cc",
      "wasm/wasm-module-sourcemap-unittest.cc",
436 437 438
    ]
  }

439 440 441 442
  if (v8_enable_wasm_gdb_remote_debugging) {
    sources += [ "wasm/wasm-gdbserver-unittest.cc" ]
  }

443 444 445 446
  if (v8_enable_conservative_stack_scanning) {
    sources += [ "heap/object-start-bitmap-unittest.cc" ]
  }

447
  if (v8_current_cpu == "arm") {
448 449 450 451
    sources += [
      "assembler/turbo-assembler-arm-unittest.cc",
      "compiler/arm/instruction-selector-arm-unittest.cc",
    ]
452
  } else if (v8_current_cpu == "arm64") {
453 454 455 456
    sources += [
      "assembler/turbo-assembler-arm64-unittest.cc",
      "compiler/arm64/instruction-selector-arm64-unittest.cc",
    ]
457
  } else if (v8_current_cpu == "x86") {
458 459 460 461
    sources += [
      "assembler/turbo-assembler-ia32-unittest.cc",
      "compiler/ia32/instruction-selector-ia32-unittest.cc",
    ]
462
  } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
463 464 465 466
    sources += [
      "assembler/turbo-assembler-mips-unittest.cc",
      "compiler/mips/instruction-selector-mips-unittest.cc",
    ]
467
  } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
468 469 470 471
    sources += [
      "assembler/turbo-assembler-mips64-unittest.cc",
      "compiler/mips64/instruction-selector-mips64-unittest.cc",
    ]
Brice Dobry's avatar
Brice Dobry committed
472 473 474 475 476
  } else if (v8_current_cpu == "riscv64") {
    sources += [
      "assembler/turbo-assembler-riscv64-unittest.cc",
      "compiler/riscv64/instruction-selector-riscv64-unittest.cc",
    ]
477
  } else if (v8_current_cpu == "x64") {
478 479 480 481
    sources += [
      "assembler/turbo-assembler-x64-unittest.cc",
      "compiler/x64/instruction-selector-x64-unittest.cc",
    ]
482 483 484
    if (v8_enable_webassembly) {
      sources += [ "wasm/trap-handler-x64-unittest.cc" ]
    }
485
  } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
486 487 488 489
    sources += [
      "assembler/turbo-assembler-ppc-unittest.cc",
      "compiler/ppc/instruction-selector-ppc-unittest.cc",
    ]
490
  } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
491 492 493 494
    sources += [
      "assembler/turbo-assembler-s390-unittest.cc",
      "compiler/s390/instruction-selector-s390-unittest.cc",
    ]
495 496 497 498 499
  } else if (v8_current_cpu == "loong64") {
    sources += [
      "assembler/turbo-assembler-loong64-unittest.cc",
      "compiler/loong64/instruction-selector-loong64-unittest.cc",
    ]
machenbach's avatar
machenbach committed
500 501
  }

502 503 504 505
  if (v8_enable_webassembly) {
    if (is_posix) {
      sources += [ "wasm/trap-handler-posix-unittest.cc" ]
    }
506

507
    if (is_win) {
508
      sources += [ "wasm/trap-handler-win-unittest.cc" ]
509
    }
510

511 512 513 514 515 516
    # Include this test only on arm64 simulator builds on x64 on Linux, Mac and
    # Windows.
    if (current_cpu == "x64" && v8_current_cpu == "arm64" &&
        (is_linux || is_mac || is_win)) {
      sources += [ "wasm/trap-handler-simulator-unittest.cc" ]
    }
517 518
  }

519
  configs = [
520
    "../..:cppgc_base_config",
machenbach's avatar
machenbach committed
521 522 523 524 525
    "../..:external_config",
    "../..:internal_config_base",
  ]

  deps = [
526
    "..:common_test_headers",
527
    "../..:v8_for_testing",
528
    "../..:v8_libbase",
machenbach's avatar
machenbach committed
529
    "../..:v8_libplatform",
530
    "../..:v8_shared_internal_headers",
531
    "../..:v8_version",
532
    "../../third_party/inspector_protocol:crdtp_test",
machenbach's avatar
machenbach committed
533
    "//build/win:default_exe_manifest",
534 535
    "//testing/gmock",
    "//testing/gtest",
machenbach's avatar
machenbach committed
536 537
  ]

538 539 540 541
  if (v8_enable_webassembly) {
    deps += [ "../..:wasm_test_common" ]
  }

542 543 544 545 546
  if (is_win) {
    # This warning is benignly triggered by the U16 and U32 macros in
    # bytecode-utils.h.
    # C4309: 'static_cast': truncation of constant value
    cflags = [ "/wd4309" ]
547 548

    sources += [ "avoid-windows-h-includes.cc" ]
549
  }
machenbach's avatar
machenbach committed
550
}