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

Nightly: Enabling LTO causes undefined symbols when using build-std #112245

Closed
newcomb-luke opened this issue Jun 3, 2023 · 2 comments · Fixed by #113923
Closed

Nightly: Enabling LTO causes undefined symbols when using build-std #112245

newcomb-luke opened this issue Jun 3, 2023 · 2 comments · Fixed by #113923
Labels
-Zbuild-std Unstable Cargo option: Compile the standard library yourself. A-LTO Area: Link-time optimization (LTO) C-bug Category: This is a bug. requires-custom-config This issue requires custom config/build for rustc in some way T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.

Comments

@newcomb-luke
Copy link

This bug occurs when I tried to build the example uefi app in a workspace of mine that enables LTO. I was able to replicate it using a standalone project:

Cargo.toml:

[package]
name = "bootloader-uefi"
version = "0.1.0"
edition = "2021"

[profile.dev]
lto = true

[dependencies]
log = "0.4"
uefi = "0.22"
uefi-services = "0.19"

main.rs:

#![no_std]
#![no_main]

use log::info;
use uefi::prelude::*;

#[entry]
fn main(_image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
    uefi_services::init(&mut system_table).unwrap();
    info!("Hello, firmware!");
    system_table.boot_services().stall(10_000_000);
    Status::SUCCESS
}

I expected the crate to compile successfully, as it does when LTO is turned off.

Instead, the crate fails to link correctly, with many undefined symbols not only from compiler_builtins but also some from core.

I am forced to use build-std, so it could definitely be related to this issue, but it is slightly different in that even disabling share-generics doesn't help.

The full command that I am running to attempt the build is:

RUST_BACKTRACE=1 RUSTFLAGS="-Zshare-generics=n" cargo build -Zbuild-std=core,compiler_builtins -Zbuild-std-features=compiler-builtins-mem --target x86_64-unknown-uefi

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (dd5d7c729 2023-06-02)
binary: rustc
commit-hash: dd5d7c729d4e8a59708df64002e09dbcbc4005ba
commit-date: 2023-06-02
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.4
Compiler output

   Compiling bootloader-uefi v0.1.0 (/home/luke/Documents/bootloader-uefi)
error: linking with rust-lld failed: exit status: 1
  = note: rust-lld: error: undefined symbol: core::panicking::panic::hb163aad4ddc55c9f
          >>> referenced by /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/../libm/src/math/exp.rs:129
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.10.rcgu.o):(compiler_builtins::math::libm::exp::exp::h02a4bfd20070f07c)
          >>> referenced by /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/../libm/src/math/exp.rs:129
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.10.rcgu.o):(compiler_builtins::math::libm::exp::exp::h02a4bfd20070f07c)
          >>> referenced by /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/../libm/src/math/fmaf.rs:102
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.10.rcgu.o):(compiler_builtins::math::libm::fmaf::fmaf::h64c4fdc39a6a9200)
          >>> referenced 581 more times

          rust-lld: error: undefined symbol: core::panicking::panic_fmt::hda82d1e6e39651a7
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:299
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.2.rcgu.o):(core::fmt::Arguments::new_const::hb12de13e127e57a4)
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:1567
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.0.rcgu.o):(core::ptr::const_ptr::_$LT$impl$u20$$BP$const$u20$T$GT$::is_aligned_to::h14d9509bf7aaf5c9)
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:1567
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.0.rcgu.o):(core::ptr::const_ptr::_$LT$impl$u20$$BP$const$u20$T$GT$::is_aligned_to::h22908f059c723326)
          >>> referenced 2 more times

          rust-lld: error: undefined symbol: core::panicking::panic_nounwind::h0f909d7fd0d3bd3e
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:1539
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.7.rcgu.o):(core::ptr::read_volatile::h2a19696369700077)
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:1539
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.7.rcgu.o):(core::ptr::read_volatile::hd1a8b1667212015d)
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:1175
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.7.rcgu.o):(core::ptr::read::h70c3ace9010db4c7)
          >>> referenced 12 more times

          rust-lld: error: undefined symbol: core::option::expect_failed::hc5188971195ae32b
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:898
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.12.rcgu.o):(core::option::Option$LT$T$GT$::expect::h63b03588bfa56574)

          rust-lld: error: undefined symbol: core::slice::index::slice_index_order_fail::h89839b514f12b875
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:406
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.8.rcgu.o):(_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$::index::h088287bcb6971bb6)

          rust-lld: error: undefined symbol: core::slice::index::slice_end_index_len_fail::hc3c969f2bc3a976b
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:408
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.8.rcgu.o):(_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$::index::h088287bcb6971bb6)

          rust-lld: error: undefined symbol: core::slice::index::slice_end_index_overflow_fail::h7c1f489fb05731b4
          >>> referenced by /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:576
          >>>               libcompiler_builtins-0152c520d1c8b186.rlib(compiler_builtins-0152c520d1c8b186.compiler_builtins.75569f00fa09706c-cgu.8.rcgu.o):(_$LT$core..ops..range..RangeInclusive$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$::index::h981b17dba1d622a5)

error: could not compile `bootloader-uefi` (bin "bootloader-uefi") due to previous error

@newcomb-luke newcomb-luke added the C-bug Category: This is a bug. label Jun 3, 2023
@newcomb-luke
Copy link
Author

Unfortunately I just tested it with a blank cargo new --bin project, and it had the same issue.

Steps to reproduce:

cargo new --bin test-lto

Cargo.toml:

[package]
name = "test-lto"
version = "0.1.0"
edition = "2021"

[profile.dev]
lto = true

[dependencies]

main.rs:

fn main() {
    println!("Hello, world!");
}

Build command:

RUST_BACKTRACE=1 RUSTFLAGS="-Zshare-generics=n" cargo build -Zbuild-std=std --target x86_64-unknown-linux-gnu
Compiler output

   Compiling test-lto v0.1.0 (/home/luke/Documents/test-lto)
error: linking with `cc` failed: exit status: 1
  = note: /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.6.rcgu.o): in function `compiler_builtins::int::shift::Ashl::ashl':
          /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/int/shift.rs:9: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.6.rcgu.o): in function `compiler_builtins::int::shift::Ashr::ashr':
          /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/int/shift.rs:31: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.6.rcgu.o): in function `compiler_builtins::int::shift::Lshr::lshr':
          /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/int/shift.rs:55: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.9.rcgu.o): in function `compiler_builtins::float::extend::extend':
          /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/extend.rs:61: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/extend.rs:63: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.9.rcgu.o):/home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/extend.rs:63: more undefined references to `core::panicking::panic' follow
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.10.rcgu.o): in function `core::hint::unreachable_unchecked::runtime':
          /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics.rs:2510: undefined reference to `core::panicking::panic_nounwind'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.10.rcgu.o): in function `<u32 as core::ops::arith::AddAssign>::add_assign':
          /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/arith.rs:753: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.10.rcgu.o): in function `<u64 as core::ops::arith::AddAssign>::add_assign':
          /home/luke/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/arith.rs:753: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.10.rcgu.o): in function `compiler_builtins::float::trunc::trunc':
          /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/trunc.rs:36: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/trunc.rs:36: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/trunc.rs:37: undefined reference to `core::panicking::panic'
          /usr/bin/ld: /home/luke/Documents/test-lto/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-6a735d5bd3926b02.rlib(compiler_builtins-6a735d5bd3926b02.compiler_builtins.c6c212234179a561-cgu.10.rcgu.o):/home/luke/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.92/src/float/trunc.rs:37: more undefined references to `core::panicking::panic' follow
          collect2: error: ld returned 1 exit status

@saethlin
Copy link
Member

saethlin commented Jun 3, 2023

rust/Cargo.toml

Lines 64 to 72 in 1e17cef

[profile.release.package.compiler_builtins]
# The compiler-builtins crate cannot reference libcore, and it's own CI will
# verify that this is the case. This requires, however, that the crate is built
# without overflow checks and debug assertions. Forcefully disable debug
# assertions and overflow checks here which should ensure that even if these
# assertions are enabled for libstd we won't enable them for compiler_builtins
# which should ensure we still link everything correctly.
debug-assertions = false
overflow-checks = false

@jyn514 jyn514 added T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. A-LTO Area: Link-time optimization (LTO) requires-custom-config This issue requires custom config/build for rustc in some way -Zbuild-std Unstable Cargo option: Compile the standard library yourself. labels Jun 4, 2023
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 14, 2023
Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again. \(^▽^)/

I will test the following issues later to verify. The task format is `Fixes {issue} {nightly-2023-07-20 result} {PR rust-lang#113923 result}`.

- [x] Fixes rust-lang#72140. ❌ ✅
- [x] Fixes rust-lang#112245. ❌ ✅
- [x] Fixes rust-lang#110606. ❌ ✅
- [ ] Fixes rust-lang#105734.
- [ ] Fixes rust-lang#96486.
- [ ] Fixes rust-lang#108853.
- [x] Fixes rust-lang/compiler-builtins#347. ❌ ✅
- [ ] Fixes rust-lang#108893.
- [ ] Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 12, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again. \(^▽^)/

I will test the following issues later to verify. The task format is `Fixes {issue} {nightly-2023-07-20 result} {PR rust-lang#113923 result}`.

- [x] Fixes rust-lang#72140. ❌ ✅
- [x] Fixes rust-lang#112245. ❌ ✅
- [x] Fixes rust-lang#110606. ❌ ✅
- [ ] Fixes rust-lang#105734.
- [ ] Fixes rust-lang#96486.
- [ ] Fixes rust-lang#108853.
- [x] Fixes rust-lang/compiler-builtins#347. ❌ ✅
- [ ] Fixes rust-lang#108893.
- [ ] Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 17, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again. \(^▽^)/

I will test the following issues later to verify. The task format is `Fixes {issue} {nightly-2023-07-20 result} {PR rust-lang#113923 result}`.

- [x] Fixes rust-lang#72140. ❌ ✅
- [x] Fixes rust-lang#112245. ❌ ✅
- [x] Fixes rust-lang#110606. ❌ ✅
- [ ] Fixes rust-lang#105734.
- [ ] Fixes rust-lang#96486.
- [ ] Fixes rust-lang#108853.
- [x] Fixes rust-lang/compiler-builtins#347. ❌ ✅
- [ ] Fixes rust-lang#108893.
- [ ] Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 27, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 28, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 14, 2023
Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 16, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 16, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 30, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 1, 2023
…kfelix

Restore `#![no_builtins]` crates participation in LTO.

After rust-lang#113716, we can make `#![no_builtins]` crates participate in LTO again.

`#![no_builtins]` with LTO does not result in undefined references to the error. I believe this type of issue won't happen again.

Fixes rust-lang#72140.  Fixes rust-lang#112245. Fixes rust-lang#110606.  Fixes rust-lang#105734. Fixes rust-lang#96486. Fixes rust-lang#108853. Fixes rust-lang#108893. Fixes rust-lang#78744. Fixes rust-lang#91158. Fixes rust-lang/cargo#10118. Fixes rust-lang/compiler-builtins#347.

 The `nightly-2023-07-20` version does not always reproduce problems due to changes in compiler-builtins, core, and user code. That's why this issue recurs and disappears.
Some issues were not tested due to the difficulty of reproducing them.

r? pnkfelix

cc `@bjorn3` `@japaric` `@alexcrichton` `@Amanieu`
@bors bors closed this as completed in 8c2b577 Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zbuild-std Unstable Cargo option: Compile the standard library yourself. A-LTO Area: Link-time optimization (LTO) C-bug Category: This is a bug. requires-custom-config This issue requires custom config/build for rustc in some way T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@saethlin @newcomb-luke @jyn514 and others