Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add i686-unknown-uefi target #64334

merged 1 commit into from Sep 12, 2019
Commits on Sep 10, 2019
  1. Add i686-unknown-uefi target

    jyao1 committed Aug 29, 2019
    This adds a new rustc target-configuration called 'i686-unknown_uefi'.
    This is similar to existing x86_64-unknown_uefi target.
    The i686-unknown-uefi target can be used to build Intel Architecture
    32bit UEFI application. The ABI defined in UEFI environment (aka IA32)
    is similar to cdecl.
    We choose i686-unknown-uefi-gnu instead of i686-unknown-uefi to avoid
    the intrinsics generated by LLVM. The detail of root-cause and solution
    analysis is added as comment in the code.
    For x86_64-unknown-uefi, we cannot use -gnu, because the ABI between
    MSVC and GNU is totally different, and UEFI chooses ABI similar to MSVC.
    For i686-unknown-uefi, the UEFI chooses cdecl ABI, which is same as
    MSVC and GNU. According to LLVM code, the only differences between MSVC
    and GNU are fmodf(f32), longjmp() and TLS, which have no impact to UEFI.
    As such, using i686-unknown-uefi-gnu is the simplest way to pass the build.
    Adding the undefined symbols, such as _aulldiv() to rust compiler-builtins
    is out of scope. But it may be considered later.
    The scope of this patch is limited to support target-configuration.
    No standard library support is added in this patch. Such work can be
    done in future enhancement.
    Cc: Josh Triplett <>
    Reviewed-by: Josh Triplett <>
You can’t perform that action at this time.