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" ] + } } } }