Skip to content

RUSTFLAGS=--cap-lints=allow causes output of --print=file-names missing when learning about target-specific information from rustc #135233

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

Closed
zjp-CN opened this issue Jan 8, 2025 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@zjp-CN
Copy link
Contributor

zjp-CN commented Jan 8, 2025

I tried this code:

#![no_std]
pub fn add(left: u64, right: u64) -> u64 {
    left + right
}

Run it with RUSTFLAGS=--cap-lints=allow cargo check --target aarch64-unknown-none-softfloat

I expected to see this happen: it compiles.

Instead, this happened: it emits error

error: output of --print=file-names missing when learning about target-specific information from rustc
command was: `/root/.cargo/bin/sccache /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names --cap-lints=allow --target
 aarch64-unknown-none-softfloat --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --
print=split-debuginfo --print=crate-name --print=cfg`

--- stdout
___
lib___.rlib
lib___.a
/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu
off
___
debug_assertions
fmt_debug="full"
overflow_checks
panic="abort"
proc_macro
relocation_model="static"
target_abi="softfloat"
target_arch="aarch64"
target_endian="little"
target_env=""
target_has_atomic
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_equal_alignment="128"
target_has_atomic_equal_alignment="16"
target_has_atomic_equal_alignment="32"
target_has_atomic_equal_alignment="64"
target_has_atomic_equal_alignment="8"
target_has_atomic_equal_alignment="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="128"
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_os="none"
target_pointer_width="64"
target_vendor="unknown"
ub_checks

Meta

rustc --version --verbose:

rustc 1.85.0-nightly (7f75bfa1a 2024-12-30)
binary: rustc
commit-hash: 7f75bfa1ad4e9a9d33a179a90603001515e91991
commit-date: 2024-12-30
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.6
@Noratrieb
Copy link
Member

Noratrieb commented Jan 8, 2025

Yeah, this is #116626, the warning gets dropped due to cap lints. A workaround is to use cap lints warn, which will still print the warning and still avoid errors the build due to warnings.

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 8, 2025
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

4 participants