Skip to content

Has Rust recently updated to an LLVM which emits calls to clzsi2? #260

Closed
@ketsuban

Description

@ketsuban

According to the README, LLVM never emits calls to __clzsi2. However, when compiling my code targeting the Game Boy Advance (thumbv4-none-eabi) with a recent nightly (rustc 1.30.0-nightly (0198a1ea4 2018-09-08)) compiler-builtins is built with calls to __clzsi2 in many functions, leading to undefined references at link time.

Here's my target file on the offchance that's relevant.

{
    "abi-blacklist": [
        "stdcall",
        "fastcall",
        "vectorcall",
        "thiscall",
        "win64",
        "sysv64"
    ],
    "ar": "arm-none-eabi-ar",
    "arch": "arm",
    "atomic-cas": false,
    "data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
    "emit-debug-gdb-scripts": false,
    "env": "",
    "executables": true,
    "features": "+soft-float,+strict-align",
    "linker": "arm-none-eabi-gcc",
    "linker-flavor": "gcc",
    "llvm-target": "thumbv4-none-eabi",
    "os": "none",
    "panic-strategy": "abort",
    "pre-link-args": {
        "gcc": [
            "--specs=gba.specs"
        ]
    },
    "relocation-model": "static",
    "target-c-int-width": "32",
    "target-endian": "little",
    "target-pointer-width": "32",
    "vendor": ""
}

It presupposes a devkitARM toolchain is available.

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