Skip to content

target-c-int-width: invalid type: string "32", expected u16 #511

@ag-wnl

Description

@ag-wnl

My custom triple target looks like:

{
  "llvm-target": "x86_64-unknown-none",
  "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
  "arch": "x86_64",
  "target-endian": "little",
  "target-pointer-width": "64",
  "target-c-int-width": 32,
  "os": "none",
  "executables": true,
  "linker-flavor": "ld.lld",
  "linker": "rust-lld",
  "panic-strategy": "abort",
  "disable-redzone": true,
  "features": "-mmx,-sse,+soft-float",
  "rustc-abi": "x86-softfloat"
}

When I run:
cargo bootimage

I get:
error: error loading target specification: target-c-int-width: invalid type: string "32", expected u16 at line 11 column 28

however, the trace of the error takes me to bootloader-0.9.31/x86_64-bootloader.json - where it's occuring as it has "32" as the target-c-int-width. I tried updating to the latest bootloader crate but everything breaks on build for some reason so it's unusable.

This is what I'm running:

rustc 1.90.0-nightly (3048886e5 2025-07-30)
binary: rustc
commit-hash: 3048886e59c94470e726ecaaf2add7242510ac11
commit-date: 2025-07-30
host: aarch64-apple-darwin
release: 1.90.0-nightly
LLVM version: 20.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions