{"record":{"id":"3b3bde487ef5387a","repo":"rust-lang/rust","slug":"unsupported-target","errorCode":null,"errorMessage":"Unsupported target {}","messagePattern":"Unsupported target (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"library/stdarch/crates/intrinsic-test/src/main.rs","lineNumber":25,"sourceCode":"\nuse arm::Arm;\nuse common::SupportedArchitecture;\nuse common::cli::{Cli, ProcessedCli};\nuse x86::X86;\n\nfn main() {\n    pretty_env_logger::init();\n    let args: Cli = clap::Parser::parse();\n    let processed_cli_options = ProcessedCli::new(args);\n\n    if processed_cli_options.target.starts_with(\"arm\")\n        | processed_cli_options.target.starts_with(\"aarch64\")\n    {\n        run(Arm::create(&processed_cli_options), processed_cli_options)\n    } else if processed_cli_options.target.starts_with(\"x86\") {\n        run(X86::create(&processed_cli_options), processed_cli_options)\n    } else {\n        unimplemented!(\"Unsupported target {}\", processed_cli_options.target)\n    }\n}\n\nfn run(test_environment: impl SupportedArchitecture, processed_cli_options: ProcessedCli) {\n    info!(\"building C binaries\");\n    test_environment.generate_c_file();\n\n    info!(\"building Rust binaries\");\n    test_environment.generate_rust_file(&processed_cli_options);\n}\n","sourceCodeStart":7,"sourceCodeEnd":36,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/library/stdarch/crates/intrinsic-test/src/main.rs#L7-L36","documentation":"The intrinsic-test harness (library/stdarch/crates/intrinsic-test/src/main.rs) only knows how to generate and run intrinsic tests for arm/aarch64 and x86 targets. main() matches the target prefix and panics with unimplemented!(\"Unsupported target {}\") for anything else.","triggerScenarios":"Invoking the intrinsic-test binary with --target set to a triple that does not start with arm, aarch64, or x86 (e.g. riscv64, powerpc64, s390x, wasm32, mips).","commonSituations":"Pointing the intrinsic test harness at a newer architecture (RISC-V) or a non-supported triple during stdarch development; passing a fully-qualified target like riscv64gc-unknown-linux-gnu.","solutions":["Pass a supported --target (arm*, aarch64*, x86*) to the intrinsic-test binary.","Add a new architecture backend implementing SupportedArchitecture and wire it into main()'s match.","Skip the intrinsic test step for unsupported architectures in your CI matrix.","Verify the target string is the vendor triple you expect, not a stray alias."],"exampleFix":"// before\n$ intrinsic-test --target riscv64gc-unknown-linux-gnu\n// panics: Unsupported target riscv64gc-unknown-linux-gnu\n\n// after\n$ intrinsic-test --target aarch64-unknown-linux-gnu","handlingStrategy":"validation","validationCode":"fn is_supported_target(target: &str) -> bool {\n    target.starts_with(\"arm\") || target.starts_with(\"aarch64\") || target.starts_with(\"x86\")\n}\n// Before invoking intrinsic-test, assert is_supported_target(&cli.target).","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict the intrinsic-test CI matrix to arm/aarch64/x86.","Validate the --target before running the harness.","Add a backend when introducing a new architecture."],"tags":["stdarch","test-tool","target-triple","intrinsics"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}