Skip to content

Commit 4751222

Browse files
sstricklCommit Queue
authored andcommitted
[pkg/dartdev] Enable Linux ARM cross-compilation on Windows.
The #ifdef block that would stop ARM cross-compilation on Windows has been outdated for a few years now, as getting the target CPU features via TargetCPUFeatures is now handled appropriately on Windows. TEST=ci, actual test depends on upload so will be in a followup CL Issue: #28617 Change-Id: I9907145ec8fb97007769276cb3c6c2442ac9e17c Cq-Include-Trybots: luci.dart.try:pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart-sdk-linux-riscv64-try,dart-sdk-linux-arm64-try,dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-arm64-try,dart-sdk-win-try,dart-sdk-mac-arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440224 Commit-Queue: Tess Strickland <[email protected]> Reviewed-by: Ivan Inozemtsev <[email protected]>
1 parent 8f9cf69 commit 4751222

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

pkg/dartdev/lib/src/commands/compile.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,7 @@ class CompileNativeCommand extends CompileSubcommandCommand {
467467
static const String exeCmdName = 'exe';
468468
static const String aotSnapshotCmdName = 'aot-snapshot';
469469
static final supportedTargetPlatforms = <Target>{
470-
// ARM cross-compilation is not supported on Windows currently.
471-
if (!Platform.isWindows) Target.linuxArm,
470+
Target.linuxArm,
472471
Target.linuxArm64,
473472
Target.linuxRiscv64,
474473
Target.linuxX64

runtime/vm/compiler/assembler/assembler_arm.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
#include "vm/instructions.h"
1515
#include "vm/tags.h"
1616

17-
// An extra check since we are assuming the existence of /proc/cpuinfo below.
18-
#if !defined(DART_INCLUDE_SIMULATOR) && !defined(__linux__) && \
19-
!defined(ANDROID) && !defined(DART_HOST_OS_IOS) && \
20-
!defined(DART_HOST_OS_MACOS)
21-
#error ARM cross-compile only supported on Linux, Android, iOS, and Mac
22-
#endif
23-
2417
// For use by LR related macros (e.g. CLOBBERS_LR).
2518
#define __ this->
2619

sdk/BUILD.gn

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,15 +879,11 @@ group("create_full_sdk") {
879879
# Do not include gen_snapshot binaries for cross-compilation into
880880
# SDK, but add them as a dependency, so that they are built.
881881
public_deps += [
882+
"../runtime/bin:gen_snapshot_product_linux_arm",
882883
"../runtime/bin:gen_snapshot_product_linux_arm64",
883884
"../runtime/bin:gen_snapshot_product_linux_riscv64",
884885
"../runtime/bin:gen_snapshot_product_linux_x64",
885886
]
886-
887-
# assembler_arm.cc disallows ARM cross-compilation on Windows.
888-
if (!is_win) {
889-
public_deps += [ "../runtime/bin:gen_snapshot_product_linux_arm" ]
890-
}
891887
}
892888
}
893889

0 commit comments

Comments
 (0)