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

Pass -Werror when building LLVM in CI #109712

Open
debohman opened this issue Mar 28, 2023 · 4 comments
Open

Pass -Werror when building LLVM in CI #109712

debohman opened this issue Mar 28, 2023 · 4 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@debohman
Copy link

While building rustc against an installed llvm-16.0.0, the following warnings occur, twice:

warning: llvm-wrapper/PassWrapper.cpp:538:7: warning: 'any_isa<const llvm::Module *>' is deprecated: Use any_cast(Any*) != nullptr instead [-Wdeprecated-declarations]
warning:   if (any_isa<const Module *>(WrappedIr))
warning:       ^~~~~~~
warning:       any_cast
warning: /usr/local/include/llvm/ADT/Any.h:130:1: note: 'any_isa<const llvm::Module *>' has been explicitly marked deprecated here
warning: LLVM_DEPRECATED("Use any_cast(Any*) != nullptr instead", "any_cast")
warning: ^
warning: /usr/local/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED'
warning: #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
warning:                                                  ^
warning: llvm-wrapper/PassWrapper.cpp:540:7: warning: 'any_isa<const llvm::Function *>' is deprecated: Use any_cast(Any*) != nullptr instead [-Wdeprecated-declarations]
warning:   if (any_isa<const Function *>(WrappedIr))
warning:       ^~~~~~~
warning:       any_cast
warning: /usr/local/include/llvm/ADT/Any.h:130:1: note: 'any_isa<const llvm::Function *>' has been explicitly marked deprecated here
warning: LLVM_DEPRECATED("Use any_cast(Any*) != nullptr instead", "any_cast")
warning: ^
warning: /usr/local/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED'
warning: #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
warning:                                                  ^
warning: llvm-wrapper/PassWrapper.cpp:542:7: warning: 'any_isa<const llvm::Loop *>' is deprecated: Use any_cast(Any*) != nullptr instead [-Wdeprecated-declarations]
warning:   if (any_isa<const Loop *>(WrappedIr))
warning:       ^~~~~~~
warning:       any_cast
warning: /usr/local/include/llvm/ADT/Any.h:130:1: note: 'any_isa<const llvm::Loop *>' has been explicitly marked deprecated here
warning: LLVM_DEPRECATED("Use any_cast(Any*) != nullptr instead", "any_cast")
warning: ^
warning: /usr/local/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED'
warning: #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
warning:                                                  ^
warning: llvm-wrapper/PassWrapper.cpp:544:7: warning: 'any_isa<const llvm::LazyCallGraph::SCC *>' is deprecated: Use any_cast(Any*) != nullptr instead [-Wdeprecated-declarations]
warning:   if (any_isa<const LazyCallGraph::SCC *>(WrappedIr))
warning:       ^~~~~~~
warning:       any_cast
warning: /usr/local/include/llvm/ADT/Any.h:130:1: note: 'any_isa<const llvm::LazyCallGraph::SCC *>' has been explicitly marked deprecated here
warning: LLVM_DEPRECATED("Use any_cast(Any*) != nullptr instead", "any_cast")
warning: ^
warning: /usr/local/include/llvm/Support/Compiler.h:143:50: note: expanded from macro 'LLVM_DEPRECATED'
warning: #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
warning:                                                  ^
warning: 4 warnings generated.

rustc --version --verbose:

rustc 1.68.1 (8460ca823 2023-03-20) (built from a source tarball)
binary: rustc
commit-hash: 8460ca823e8367a30dda430efda790588b8c84d3
commit-date: 2023-03-20
host: x86_64-apple-darwin
release: 1.68.1
LLVM version: 16.0.0

This report is to document the issue.

@debohman debohman added the C-bug Category: This is a bug. label Mar 28, 2023
@nikic nikic added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 29, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 3, 2023

Oh, I saw these recently too actually. They also exist on latest master.

@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. labels Apr 3, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 3, 2023

Probably we should block CI on these errors? They should at least be controlled by deny-warnings in config.toml.

@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 3, 2023
@klensy
Copy link
Contributor

klensy commented May 7, 2023

Fixed by #110523?

@jyn514
Copy link
Member

jyn514 commented May 7, 2023

The warning was fixed, but we should still block on warnings in CI.

@jyn514 jyn514 changed the title LLVM deprecation warnings while building rustc 1.68.2 against llvm-16.0.0 Pass -Werror when building LLVM in CI May 24, 2023
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. C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. 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

4 participants