Closed kamleshbhalui closed 1 year ago
# Whether or not to optimize the compiler and standard library.
# WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping,
# building without optimizations takes much longer than optimizing. Further, some platforms
# fail to build without this optimization (c.f. #65352).
optimize = false
Try setting this to optimize = true; like the comment says, the reverse isn't supported.
@jyn514 I will try enabling optimization but Error says this ld.lld: error: undefined symbol: _Unwind_Resume it looks like build system unable to pick libunwind?
@jyn514 enabling optimization does not resolve this.
rror: linking with cc
failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_main-3446de28edb6057f.rustc_main.7bi47v63-cgu.0.rcgu.o" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_main-3446de28edb6057f.rustc_main.7bi47v63-cgu.1.rcgu.o" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_main-3446de28edb6057f.rustc_main.7bi47v63-cgu.2.rcgu.o" "-o" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_main-3446de28edb6057f" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/psm-be6e39de58eb97a5/out" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-f0dd5221ee9b93aa/out" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/llvm/build/lib" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps" "-lrustc_driver-5b90eefb08e3d62c" "-Wl,--start-group" "-L" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-e05788ae03266863" "-Wl,--end-group" "-Wl,-Bstatic" "/home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-008b50954fae7ba2.rlib" "-Wl,-Bdynamic" "-lLLVM-11-rust-dev" "-lstdc++" "-lutil" "-ldl" "-lutil" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil" "-Wl,-rpath,$ORIGIN/../lib" "-fuse-ld=lld"
= note: ld.lld: error: /home/kk/kkumar/tcrust/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver-5b90eefb08e3d62c.so: undefined reference to _Unwind_Resume
collect2: error: ld returned 1 exit status
error: aborting due to previous error
error: could not compile rustc-main
.
Duplicate of https://github.com/rust-lang/rust/issues/76020
Reproduce in stable Rust by:
git clone https://github.com/BVE-Reborn/rend3.git
cd rend3
cargo build --target i686-pc-windows-gnu
Environment: Ubuntu 20.04 LTS x64, rustc 1.59.0 (9d1b2106e 2022-02-23)
Closing as a duplicate of https://github.com/rust-lang/rust/issues/76020.
This is my config.toml https://gist.github.com/kamleshbhalui/fcf70a8f4167565f7e73e90d13d468fa#file-config-toml
with latest rust clone(01-10-2020)