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

Enable ninja by default on MSVC #43767

Closed
alexcrichton opened this issue Aug 9, 2017 · 1 comment
Closed

Enable ninja by default on MSVC #43767

alexcrichton opened this issue Aug 9, 2017 · 1 comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows-msvc Toolchain: MSVC, Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@alexcrichton
Copy link
Member

When working locally dmajor has found that apparently disabling LLVM assertions doesn't work on MSVC when compiling LLVM. Despite -DLLVM_ASSERTIONS=OFF apparently they're still compiled in!

This isn't the first time IIRC of LLVM definitions and such not actually getting communicated to the msbuild build system. My guess is that this is a bug in LLVM's build system or something like that. In any case I think we should at least start using ninja by default if we detect ninja in PATH, and otherwise we may want to print warnings on "known bad" cases saying that msbuild isn't reading configuration options correctly, recommending a download of ninja

@alexcrichton alexcrichton added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) O-windows-msvc Toolchain: MSVC, Operating system: Windows labels Aug 9, 2017
@alexcrichton
Copy link
Member Author

It looks like RelWithDebInfo may also be communicated to msbuild but not implemented? It apparently works well though when compiled with ninja!

@Mark-Simulacrum Mark-Simulacrum added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Aug 10, 2017
alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 25, 2017
Discovered in rust-lang#43767 it turns out the default MSBuild generator in CMake for
whatever reason isn't supporting many of the configuration options we give to
LLVM. To improve the contributor experience automatically enable Ninja if we
find it to ensure that "flavorful" configurations of LLVM work by default in
more situations.

Closes rust-lang#43767
alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 26, 2017
…ulacrum

rustbuild: Automatically enable Ninja on MSVC

Discovered in rust-lang#43767 it turns out the default MSBuild generator in CMake for
whatever reason isn't supporting many of the configuration options we give to
LLVM. To improve the contributor experience automatically enable Ninja if we
find it to ensure that "flavorful" configurations of LLVM work by default in
more situations.

Closes rust-lang#43767
bors added a commit that referenced this issue Aug 26, 2017
rustbuild: Automatically enable Ninja on MSVC

Discovered in #43767 it turns out the default MSBuild generator in CMake for
whatever reason isn't supporting many of the configuration options we give to
LLVM. To improve the contributor experience automatically enable Ninja if we
find it to ensure that "flavorful" configurations of LLVM work by default in
more situations.

Closes #43767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows-msvc Toolchain: MSVC, Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants