Skip to content

Make codegen regressions respect enabled LLVM target features #484

Closed

Description

@LunaStev

Summary

cargo test --no-default-features --features llvm-target-core64 builds successfully, but seven codegen regressions still invoke loongarch64-unknown-linux-gnu unconditionally. The compiler correctly rejects that target because llvm-target-loongarch is disabled, so the Windows GNU amd64 build job fails after compilation even though its cases job passes.

This was exposed by #474 when LoongArch was separated from llvm-target-core64 to keep feature-isolated builds compatible with LLVM distributions that only contain X86, AArch64, and RISCV.

Reproduction

cargo test --locked --no-default-features --features llvm-target-core64 --jobs 2

The following regressions fail by requesting an unavailable LoongArch target:

  • hosted_linux_link_plans_use_wave_crt_for_every_architecture_and_mode
  • loongarch64_float_abi_modes_match_clang_contracts
  • loongarch64_link_inputs_require_matching_abi_before_linking
  • loongarch64_lp64f_hosted_linking_is_rejected_before_the_linker
  • std_net_compiles_for_every_supported_socket_abi
  • narrow_integer_c_abi_attributes_match_clang_targets
  • odd_sized_aggregate_transport_matches_clang_ir_contracts

Expected behavior

The regression suite should exercise exactly the backends enabled for the current compiler build. LoongArch-only tests should require llvm-target-loongarch, while mixed target loops should retain their core64 assertions and add LoongArch entries only when that feature is enabled.

Acceptance criteria

  • Gate LoongArch-only tests with the matching Cargo feature.
  • Make mixed target tables conditionally include LoongArch without dropping X86/AArch64/RISCV coverage.
  • Execute, not only compile, the feature-isolated test configurations in CI.
  • Keep the default all-supported-target test suite unchanged.
  • Make the Windows GNU amd64 build job in feat: expand native 64-bit architecture support #474 pass its Rust tests.

Evidence

Activity

  1. added
    bug
    good first issue
    needs testing
    on Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueneeds testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions