Skip to content

Commit 690b380

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[infra] Add configuration for testing SIMARM64 on ARM64.
Bug: #60204 Change-Id: Id49d144bedb7eb2047ee1cc36dd737bff62e808e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411840 Reviewed-by: Daco Harkes <[email protected]> Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent e1d8b25 commit 690b380

File tree

7 files changed

+41
-2
lines changed

7 files changed

+41
-2
lines changed

pkg/smith/lib/configuration.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,8 @@ class Architecture extends NamedEnum {
722722
// ignore: constant_identifier_names
723723
static const simarm_x64 = Architecture._('simarm_x64');
724724
static const simarm64 = Architecture._('simarm64');
725+
// ignore: constant_identifier_names
726+
static const simarm64_arm64 = Architecture._('simarm64_arm64');
725727
static const simarm64c = Architecture._('simarm64c');
726728
static const riscv32 = Architecture._('riscv32');
727729
static const riscv64 = Architecture._('riscv64');
@@ -743,6 +745,7 @@ class Architecture extends NamedEnum {
743745
simarm,
744746
simarm_x64,
745747
simarm64,
748+
simarm64_arm64,
746749
simarm64c,
747750
riscv32,
748751
riscv64,

pkg/test_runner/lib/src/runtime_configuration.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ class QemuConfig {
308308
QemuConfig('qemu-arm', ['-L', '/usr/arm-linux-gnueabihf/']),
309309
Architecture.arm64:
310310
QemuConfig('qemu-aarch64', ['-L', '/usr/aarch64-linux-gnu/']),
311+
Architecture.simarm64_arm64:
312+
QemuConfig('qemu-aarch64', ['-L', '/usr/aarch64-linux-gnu/']),
311313
Architecture.arm64c:
312314
QemuConfig('qemu-aarch64', ['-L', '/usr/aarch64-linux-gnu/']),
313315
Architecture.riscv32:

runtime/BUILD.gn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ config("dart_arch_config") {
147147
print("Invalid dart_target_arch: $dart_target_arch")
148148
assert(false)
149149
}
150+
if (dart_force_simulator) {
151+
defines += [ "USING_SIMULATOR" ]
152+
}
150153
}
151154

152155
config("dart_config") {

runtime/runtime_args.gni

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ declare_args() {
3131
# Available options are: arm, arm64, x64, ia32, riscv32, riscv64.
3232
dart_target_arch = target_cpu
3333

34+
# Force use of the simulator even when the Dart target arch matches the current cpu.
35+
dart_force_simulator = false
36+
3437
# The optimization level to use for debug builds. Defaults to 0 for builds with
3538
# code coverage enabled.
3639
dart_debug_optimization_level = "2"

tests/ffi/ffi.status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ regress_47594_test: Skip # DynamicLibrary.process() is not available on Windows.
7575
function_callbacks_leaf_test: SkipByDesign # Needs access to Dart executable
7676
native_assets/*: SkipByDesign # Only intended to run on host oses with AOT binaries available, not available on QEMU.
7777

78-
[ $simulator ]
78+
[ $arch != simarm64_arm64 && $simulator ]
7979
*: Skip # FFI not yet supported on the arm simulator.
8080

8181
[ $compiler != dart2analyzer && $compiler != fasta && $runtime != dart_precompiled && $runtime != vm ]

tools/bots/test_matrix.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
"builder-tag": "ffi"
334334
}
335335
},
336-
"vm-(linux|mac|win|android|fuchsia)-(debug|product|release)-(ia32|x64|x64c|arm|arm64|arm64c|simarm|simarm64|simriscv32|simriscv64)": {
336+
"vm-(linux|mac|win|android|fuchsia)-(debug|product|release)-(ia32|x64|x64c|arm|arm64|arm64c|simarm|simarm64|simarm64_arm64|simriscv32|simriscv64)": {
337337
"options": {}
338338
},
339339
"vm-checked-(linux|mac|win|fuchsia)-(debug|product|release)-(ia32|x64|x64c|arm64|arm64c|simarm|simarm64|simriscv32|simriscv64)": {
@@ -847,6 +847,31 @@
847847
}
848848
]
849849
},
850+
{
851+
"builders": [
852+
"vm-ffi-mac-debug-simarm64_arm64",
853+
"vm-ffi-mac-release-simarm64_arm64"
854+
],
855+
"meta": {
856+
"description": "This configuration is used for running FFI tests"
857+
},
858+
"steps": [
859+
{
860+
"name": "build dart",
861+
"script": "tools/build.py",
862+
"arguments": [
863+
"runtime"
864+
]
865+
},
866+
{
867+
"name": "vm ffi tests",
868+
"arguments": [
869+
"-nvm-${system}-${mode}-${arch}",
870+
"ffi"
871+
]
872+
}
873+
]
874+
},
850875
{
851876
"builders": [
852877
"vm-ffi-qemu-linux-release-arm"

tools/gn.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash,
205205
gn_args['host_cpu'] = HostCpuForArch(arch)
206206
gn_args['target_cpu'] = TargetCpuForArch(arch)
207207
gn_args['dart_target_arch'] = DartTargetCpuForArch(arch)
208+
if gn_args['target_cpu'] == gn_args['dart_target_arch'] and arch.startswith(
209+
'sim'):
210+
gn_args['dart_force_simulator'] = True
208211
gn_args['dart_use_compressed_pointers'] = IsCompressedPointerArch(arch)
209212

210213
# Configure Crashpad library if it is used.

0 commit comments

Comments
 (0)