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

LLVM doesn't build on the first try when cross compilling to windows-gnu host #64218

Closed
mati865 opened this issue Sep 6, 2019 · 1 comment · Fixed by #75625
Closed

LLVM doesn't build on the first try when cross compilling to windows-gnu host #64218

mati865 opened this issue Sep 6, 2019 · 1 comment · Fixed by #75625
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-windows-gnu Toolchain: GNU, Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@mati865
Copy link
Contributor

mati865 commented Sep 6, 2019

Running ./x.py build --host x86_64-pc-windows-gnu --target x86_64-pc-windows-gnu from Linux will fail on building LLVM for Windows (so it's 2nd LLVM build) because somehow LLVM_ON_UNIX is defined:

/home/mateusz/Projects/rust/rust/src/llvm-project/llvm/include/llvm/Support/FileSystem.h:164:3: error: ‘uid_t’ does not name a type; did you mean ‘pid_t’?
  164 |   uid_t fs_st_uid = 0;
      |   ^~~~~
      |   pid_t

Magic happens when running the same command second time without cleaning build dir or changing anything. It will finish LLVM build and install the files.

Rust build will fail on librustc_codegen_llvm because of missing shell32 but this could be unrelated (although CMake should link it).

@jonas-schievink jonas-schievink added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. O-windows-gnu Toolchain: GNU, Operating system: Windows labels Sep 10, 2019
@bors bors closed this as completed in 3cf8f69 Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-windows-gnu Toolchain: GNU, Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@mati865 @jonas-schievink and others