Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
46f6e39
add assert messages if chunks/windows are length 0
raffimolero Dec 12, 2022
1588944
interpret: add read_machine_[ui]size convenience methods
RalfJung Dec 12, 2022
8b2a7da
Rename `assert_uninit_valid` intrinsic
Noratrieb Dec 12, 2022
7f94389
str.lines() docstring: clarify that line endings are not returned
zacchiro Dec 17, 2022
a213bb3
implement the skeleton of the updated trait solver
lcnr Dec 4, 2022
750bf36
dedup assembly
lcnr Dec 19, 2022
082ca1e
docs: add long error explanation for error E0472
Ezrashaw Dec 16, 2022
168e3da
rustdoc: prevent CSS layout of line numbers shrinking into nothing
notriddle Dec 20, 2022
b29a9e3
rustdoc: simplify section anchor CSS
notriddle Dec 20, 2022
fb89ae4
Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-…
jyn514 Dec 20, 2022
f5e776c
Refer to "Waker" rather than "RawWaker" in `drop` comment
goffrie Dec 20, 2022
5538c92
Fix typo in reading_half_a_pointer.rs
eltociear Dec 21, 2022
6f21ba4
less specific wording
RalfJung Dec 21, 2022
1286d98
Don't explicitly set C++ standard for lld
nikic Dec 20, 2022
6733a3f
Use LLVM_CMAKE_DIR for lld build
nikic Dec 20, 2022
8804de2
Rollup merge of #105584 - raffimolero:patch-1, r=JohnTitor
fee1-dead Dec 21, 2022
57f47c7
Rollup merge of #105602 - RalfJung:read-convenience, r=oli-obk
fee1-dead Dec 21, 2022
fd3c544
Rollup merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=Ral…
fee1-dead Dec 21, 2022
4fc45e5
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
fee1-dead Dec 21, 2022
5ba613c
Rollup merge of #105791 - Ezrashaw:add-e0472-long-docs, r=GuillaumeGomez
fee1-dead Dec 21, 2022
ea89528
Rollup merge of #105824 - zacchiro:patch-1, r=JohnTitor
fee1-dead Dec 21, 2022
b5853f6
Rollup merge of #105964 - notriddle:notriddle/scraped-example-length,…
fee1-dead Dec 21, 2022
f6af81a
Rollup merge of #105972 - notriddle:notriddle/anchor, r=GuillaumeGomez
fee1-dead Dec 21, 2022
955b21b
Rollup merge of #105976 - jyn514:unused-make-targets, r=Mark-Simulacrum
fee1-dead Dec 21, 2022
00419d5
Rollup merge of #105980 - goffrie:waker-drop, r=thomcc
fee1-dead Dec 21, 2022
db5280a
Rollup merge of #105986 - eltociear:patch-18, r=RalfJung
fee1-dead Dec 21, 2022
f3ebf4f
Rollup merge of #106000 - nikic:lld-build, r=Mark-Simulacrum
fee1-dead Dec 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use LLVM_CMAKE_DIR for lld build
LLVM_CONFIG_PATH is no longer supported as of LLVM 16, switch to
using the cmake module instead.
  • Loading branch information
nikic committed Dec 21, 2022
commit 6733a3f7790761152a05790ebf3d252935f5405f
5 changes: 0 additions & 5 deletions src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ name = "sccache-plus-cl"
path = "bin/sccache-plus-cl.rs"
test = false

[[bin]]
name = "llvm-config-wrapper"
path = "bin/llvm-config-wrapper.rs"
test = false

[dependencies]
cmake = "0.1.38"
fd-lock = "3.0.8"
Expand Down
24 changes: 0 additions & 24 deletions src/bootstrap/bin/llvm-config-wrapper.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@ impl Step for Bootstrap {
let tarball = Tarball::new(builder, "bootstrap", &target.triple);

let bootstrap_outdir = &builder.bootstrap_out;
for file in &["bootstrap", "llvm-config-wrapper", "rustc", "rustdoc", "sccache-plus-cl"] {
for file in &["bootstrap", "rustc", "rustdoc", "sccache-plus-cl"] {
tarball.add_file(bootstrap_outdir.join(exe(file, target)), "bootstrap/bin", 0o755);
}

Expand Down
47 changes: 7 additions & 40 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,12 @@ impl Step for Lld {
let target = self.target;

let llvm_config = builder.ensure(Llvm { target: self.target });
let mut llvm_cmake_dir = llvm_config;
llvm_cmake_dir.pop();
llvm_cmake_dir.pop();
llvm_cmake_dir.push("lib");
llvm_cmake_dir.push("cmake");
llvm_cmake_dir.push("llvm");

let out_dir = builder.lld_out(target);
let done_stamp = out_dir.join("lld-finished-building");
Expand Down Expand Up @@ -834,22 +840,6 @@ impl Step for Lld {
configure_cmake(builder, target, &mut cfg, true, ldflags);
configure_llvm(builder, target, &mut cfg);

// This is an awful, awful hack. Discovered when we migrated to using
// clang-cl to compile LLVM/LLD it turns out that LLD, when built out of
// tree, will execute `llvm-config --cmakedir` and then tell CMake about
// that directory for later processing. Unfortunately if this path has
// forward slashes in it (which it basically always does on Windows)
// then CMake will hit a syntax error later on as... something isn't
// escaped it seems?
//
// Instead of attempting to fix this problem in upstream CMake and/or
// LLVM/LLD we just hack around it here. This thin wrapper will take the
// output from llvm-config and replace all instances of `\` with `/` to
// ensure we don't hit the same bugs with escaping. It means that you
// can't build on a system where your paths require `\` on Windows, but
// there's probably a lot of reasons you can't do that other than this.
let llvm_config_shim = env::current_exe().unwrap().with_file_name("llvm-config-wrapper");

// Re-use the same flags as llvm to control the level of debug information
// generated for lld.
let profile = match (builder.config.llvm_optimize, builder.config.llvm_release_debuginfo) {
Expand All @@ -860,32 +850,9 @@ impl Step for Lld {

cfg.out_dir(&out_dir)
.profile(profile)
.env("LLVM_CONFIG_REAL", &llvm_config)
.define("LLVM_CONFIG_PATH", llvm_config_shim)
.define("LLVM_CMAKE_DIR", llvm_cmake_dir)
.define("LLVM_INCLUDE_TESTS", "OFF");

// While we're using this horrible workaround to shim the execution of
// llvm-config, let's just pile on more. I can't seem to figure out how
// to build LLD as a standalone project and also cross-compile it at the
// same time. It wants a natively executable `llvm-config` to learn
// about LLVM, but then it learns about all the host configuration of
// LLVM and tries to link to host LLVM libraries.
//
// To work around that we tell our shim to replace anything with the
// build target with the actual target instead. This'll break parts of
// LLD though which try to execute host tools, such as llvm-tblgen, so
// we specifically tell it where to find those. This is likely super
// brittle and will break over time. If anyone knows better how to
// cross-compile LLD it would be much appreciated to fix this!
if target != builder.config.build {
cfg.env("LLVM_CONFIG_SHIM_REPLACE", &builder.config.build.triple)
.env("LLVM_CONFIG_SHIM_REPLACE_WITH", &target.triple)
.define(
"LLVM_TABLEGEN_EXE",
llvm_config.with_file_name("llvm-tblgen").with_extension(EXE_EXTENSION),
);
}

cfg.build();

t!(File::create(&done_stamp));
Expand Down