From 1e9e0b105b25d550de541e867269f46f6a4cf5e1 Mon Sep 17 00:00:00 2001 From: Tess Strickland Date: Wed, 2 Jul 2025 04:49:59 -0700 Subject: [PATCH] [vm] Don't generate gen_snapshot targeting ARM/RISCV64 for ARM64C/X64C. Currently, DART_COMPRESSED_POINTERS is used both for the host and the target, and the ARM assembler treats it being defined as an error and the RISCV assembler does not appropriately define certain methods when compressed pointers are used. TEST=manual build of create_sdk for arm64c/x64c, since there are no pkg/sdk trybots for compressed architectures. Issue: https://github.com/dart-lang/sdk/issues/28617 Change-Id: Iac31b23b59c0d5cfe2bef007c553f56e5144d782 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438500 Commit-Queue: Tess Strickland Reviewed-by: Martin Kustermann Reviewed-by: Ivan Inozemtsev --- sdk/BUILD.gn | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 17b62222bd3..ae8c90e052d 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -880,13 +880,18 @@ group("create_full_sdk") { # SDK, but add them as a dependency, so that they are built. public_deps += [ "../runtime/bin:gen_snapshot_product_linux_arm64", - "../runtime/bin:gen_snapshot_product_linux_riscv64", "../runtime/bin:gen_snapshot_product_linux_x64", ] - # assembler_arm.cc disallows ARM cross-compilation on Windows. - if (!is_win) { - public_deps += [ "../runtime/bin:gen_snapshot_product_linux_arm" ] + # Don't add cross compilers for architectures that do not support + # compressed pointers in SDKs built for compressed pointers. + if (!dart_use_compressed_pointers) { + public_deps += [ "../runtime/bin:gen_snapshot_product_linux_riscv64" ] + + # assembler_arm.cc disallows ARM cross-compilation on Windows. + if (!is_win) { + public_deps += [ "../runtime/bin:gen_snapshot_product_linux_arm" ] + } } } }