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

Build errors on recent nightlies when compiling rustc-std-workspace-core on UEFI targets #71880

Closed
IsaacWoods opened this issue May 4, 2020 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@IsaacWoods
Copy link
Contributor

A build error was reported in one of my projects (IsaacWoods/poplar#54) with recent nightlies (rustc 1.45.0-nightly (fa51f810e 2020-04-29) is the last known good nightly) using the target x86_64-unknown-uefi. The errors were:

   Compiling rustc-std-workspace-core v1.99.0 (/home/mtnygard/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-core)
error: <inline asm>:2:33: error: unknown flag
            .section .llvmbc,"e"
                                ^

error: <inline asm>:3:34: error: unknown flag
            .section .llvmcmd,"e"
                                 ^

error: aborting due to 2 previous errors

error: could not compile `rustc-std-workspace-core`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: <inline asm>:2:33: error: unknown flag
            .section .llvmbc,"e"
                                ^

error: <inline asm>:3:34: error: unknown flag
            .section .llvmcmd,"e"
                                 ^

error: <inline asm>:2:33: error: unknown flag
            .section .llvmbc,"e"
                                ^

error: <inline asm>:3:34: error: unknown flag
            .section .llvmcmd,"e"
                                 ^

error: <inline asm>:55:33: error: unknown flag
            .section .llvmbc,"e"
                                ^

error: <inline asm>:56:34: error: unknown flag
            .section .llvmcmd,"e"
                                 ^

It looks like this issue was introduced by #71528. I will submit a PR that I believe fixes this on UEFI targets.

@IsaacWoods IsaacWoods added the C-bug Category: This is a bug. label May 4, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 4, 2020
Correctly handle UEFI targets as Windows-like when emitting sections for LLVM bitcode

This handles UEFI handles when emitting inline assembly for sections containing LLVM bitcode. See details in rust-lang#71880. I have locally confirmed that this change fixes compilation of projects using the `x86_64-unknown-uefi` target compiling with `cargo-xbuild`, but I am not very familiar with LLVM bitcode so this may not be the correct approach.

r? @alexcrichton as they wrote the initial LLVM bitcode emitting code?
@JohnTitor
Copy link
Member

It seems the issue has been fixed by #71881, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants