Skip to content

bootstrap: use-linker breaks build #140327

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

Open
matthiaskrgr opened this issue Apr 26, 2025 · 0 comments
Open

bootstrap: use-linker breaks build #140327

matthiaskrgr opened this issue Apr 26, 2025 · 0 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@matthiaskrgr
Copy link
Member

Summary

Command used

./x.py build

Expected behaviour

pass

Actual behaviour

fail

Bootstrap configuration (bootstrap.toml)

change-id = 138934
[llvm]
download-ci-llvm = false
optimize = true
thin-lto = true
release-debuginfo = true
assertions = true
plugins = true
ninja = true
targets = "X86"
link-jobs = 4
cflags = "-march=native"
cxxflags = "-march=native"
ldflags = "-march=native"
use-linker ="/usr/bin/ld.lld"
[gcc]
[build]
[install]
[rust]
[target.x86_64-unknown-linux-gnu]
[dist]

Operating system

6.13.8-2-MANJARO

HEAD

d3508a8

Additional context

Build Log

Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.11s
Building LLVM for x86_64-unknown-linux-gnu
CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-unknown-linux-gnu = None
CMAKE_x86_64_unknown_linux_gnu = None
HOST_CMAKE = None
CMAKE = None
running: cd "/home/matthias/vcs/github/rust_debug_assertions/build/x86_64-unknown-linux-gnu/llvm/build" && CMAKE_PREFIX_PATH="" DESTDIR="" LC_ALL="C" "cmake" "/home/matthias/vcs/github/rust_debug_assertions/src/llvm-project/llvm" "-G" "Ninja" "-DLLVM_ENABLE_ASSERTIONS=ON" "-DLLVM_UNREACHABLE_OPTIMIZE=OFF" "-DLLVM_ENABLE_PLUGINS=ON" "-DLLVM_TARGETS_TO_BUILD=X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR;M68k;CSKY;Xtensa" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=16" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" "-DLLVM_ENABLE_WARNINGS=OFF" "-DLLVM_INSTALL_UTILS=ON" "-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_PARALLEL_LINK_JOBS=4" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=clang" "-DCMAKE_CXX_COMPILER=clang++" "-DCMAKE_ASM_COMPILER=clang" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-unknown-linux-gnu -march=native" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-unknown-linux-gnu -march=native" "-DCMAKE_SHARED_LINKER_FLAGS= -march=native" "-DCMAKE_MODULE_LINKER_FLAGS= -march=native" "-DCMAKE_EXE_LINKER_FLAGS= -march=native" "-DLLVM_ENABLE_LTO=Thin" "-DLLVM_ENABLE_LLD=ON" "-DLLVM_ENABLE_ZSTD=OFF" "-DLLVM_USE_LINKER=/usr/bin/ld.lld" "-DCMAKE_INSTALL_PREFIX=/home/matthias/vcs/github/rust_debug_assertions/build/x86_64-unknown-linux-gnu/llvm" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-unknown-linux-gnu" "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
CMake Deprecation Warning at /home/matthias/vcs/github/rust_debug_assertions/src/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:8 (include)


-- LLVM host triple: x86_64-unknown-linux-gnu
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.12.1
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM default target triple: x86_64-unknown-linux-gnu
CMake Error at cmake/modules/HandleLLVMOptions.cmake:384 (message):
  LLVM_ENABLE_LLD and LLVM_USE_LINKER can't be set at the same time
Call Stack (most recent call first):
  CMakeLists.txt:1019 (include)


-- Configuring incomplete, errors occurred!

thread 'main' panicked at /home/matthias/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cmake-0.1.54/src/lib.rs:1119:5:

command did not execute successfully, got: exit status: 1

build script failed, must exit now
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
	finished in 0.367 seconds
Build completed unsuccessfully in 0:00:00

@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 26, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 26, 2025
@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 26, 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. 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

3 participants