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 build output spew doubles the size CI logs. #70468

Closed
eddyb opened this issue Mar 27, 2020 · 1 comment · Fixed by #93918
Closed

LLVM build output spew doubles the size CI logs. #70468

eddyb opened this issue Mar 27, 2020 · 1 comment · Fixed by #93918
Labels
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) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Mar 27, 2020

Out of the 12622 log lines in a recent dist-x86_64-linux build:

  • 4843 of them are from the LLVM build itself
    • half of those are printing the file being compiled
    • the other half is this warning for every compiler invocation:
      clang-9: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
      
  • 1693 are from installing the LLVM build

So that's 6536 lines, over half of the log, that's noise from a successful LLVM build.

The result is slowed down log navigation, which can be frustrating when looking for an failure.

I'm not sure what the best way to quiet each of these things is, but I should mention that with ninja (and no -static-libstdc++), the only thing I see locally is the 1693 "Installing: ..." lines:

  • the build itself is contained within one status line, assuming there are no warnings, but I'm not sure how ninja would behave on CI (on Windows CI it certainly still outputs one line per file)
  • would be nice to get rid of those "Installing: ..." lines locally too

cc @Mark-Simulacrum

@Mark-Simulacrum Mark-Simulacrum added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Mar 27, 2020
@Mark-Simulacrum Mark-Simulacrum 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) labels Mar 27, 2020
@jonhoo
Copy link
Contributor

jonhoo commented Jan 28, 2022

Just to leave a trail of breadcrumbs, there was an attempted fix for this in #89983

bors added a commit to rust-lang-ci/rust that referenced this issue Feb 15, 2022
…ark-Simulacrum

bootstrap: tidy up flag handling for llvm build

This tidies up the logic in `src/bootstrap/native.rs` such that:

 - `CMAKE_*_LINKER_FLAGS` is not overridden if we add to it twice.
 - `CMAKE_*_FLAGS` also include the standard `*FLAGS` environment
   variables, which CMake respects when we _don't_ set `CMAKE_*_FLAGS`.
 - `llvm.ldflags` from `config.toml` appends to the ldflags Rust's
   bootstrap logic adds, rather than replacing them.

It also takes a second stab at rust-lang#89983 by moving `-static-libstdc++` to just be passed as a linker flag, since that's what it is.

Fixes rust-lang#93880. Fixes rust-lang#70468. Closes rust-lang#89983.
@bors bors closed this as completed in 3669274 Feb 15, 2022
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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants