Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4dded23
add `special_module_name` lint
ibraheemdev Mar 1, 2022
c08f460
tidy
ibraheemdev Apr 15, 2022
f479289
move dummy test module to auxiliary directory
ibraheemdev Jun 4, 2022
4fdf43f
`special_module_name`: ignore inline modules
ibraheemdev Jul 21, 2022
b9c47f6
Use getuid to check instead of USER env var in rustbuild
Samyak2 Aug 21, 2022
e136e02
bootstrap: Add llvm-has-rust-patches target option
tmandry Aug 27, 2022
73958fd
Ignore cargo target folder in src/bootstrap
tmandry Aug 27, 2022
de6a3ec
Make docs formulation more consistent for NonZero{int}
yjhn Aug 30, 2022
8410df3
Also replace the version placeholder in rustc_attr
est31 Aug 30, 2022
803e35a
Remove unneeded extra whitespace before where clause
GuillaumeGomez Aug 31, 2022
4304d1d
Update rustdoc tests
GuillaumeGomez Aug 31, 2022
b112bfe
Add rustdoc GUI test
GuillaumeGomez Aug 31, 2022
a928255
Fix bad target name in Walkthrough
diminishedprime Aug 31, 2022
037a911
rustdoc: remove unused `.docblock .impl-items` CSS
notriddle Aug 31, 2022
d8b572b
Tweaks to fuchsia doc walkthrough
andrewpollack Aug 31, 2022
a20318d
Update outdated comment about output capturing in print_to.
m-ou-se Sep 1, 2022
098725c
Fix filename of armv4t-none-eabi.md
QuinnPainter Sep 1, 2022
c9f4af6
Fix typo in comment
aDotInTheVoid Sep 1, 2022
78e9bea
do not suggest adding `move` to closure when `move` is already used
TaKO8Ki Sep 1, 2022
96ae006
Rollup merge of #94467 - ibraheemdev:master, r=pnkfelix
matthiaskrgr Sep 1, 2022
08e8695
Rollup merge of #100852 - Samyak2:samyak/100459, r=Mark-Simulacrum
matthiaskrgr Sep 1, 2022
827d33f
Rollup merge of #101072 - tmandry:llvm-is-vanilla, r=Mark-Simulacrum
matthiaskrgr Sep 1, 2022
f40cb90
Rollup merge of #101190 - yjhn:patch-1, r=Mark-Simulacrum
matthiaskrgr Sep 1, 2022
6a4f64c
Rollup merge of #101215 - est31:rustdoc_version_placeholder, r=Mark-S…
matthiaskrgr Sep 1, 2022
a60dc0c
Rollup merge of #101245 - GuillaumeGomez:remove-unneeded-where-whites…
matthiaskrgr Sep 1, 2022
3a68093
Rollup merge of #101251 - diminishedprime:patch-1, r=JohnTitor
matthiaskrgr Sep 1, 2022
a435d06
Rollup merge of #101254 - rust-lang:notriddle/remove-even-more-css, r…
matthiaskrgr Sep 1, 2022
1cb8ff0
Rollup merge of #101256 - andrewpollack:fuchsia-docs-adding, r=tmandry
matthiaskrgr Sep 1, 2022
5453c8d
Rollup merge of #101270 - m-ou-se:update-comment, r=joshtriplett
matthiaskrgr Sep 1, 2022
a25eef1
Rollup merge of #101271 - QuinnPainter:patch-1, r=Dylan-DPC
matthiaskrgr Sep 1, 2022
a3d1970
Rollup merge of #101274 - aDotInTheVoid:comment-typo, r=TaKO8Ki
matthiaskrgr Sep 1, 2022
22a30bd
Rollup merge of #101285 - TaKO8Ki:do-not-suggest-adding-move-when-clo…
matthiaskrgr Sep 1, 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
bootstrap: Add llvm-has-rust-patches target option
This is so you can check out an upstream commit in src/llvm-project and
have everything just work.
  • Loading branch information
tmandry committed Aug 29, 2022
commit e136e02fd97ac5207f1a0d1edd276ef22a1d24c1
4 changes: 4 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,10 @@ changelog-seen = 2
# target.
#llvm-config = <none> (path)

# Override detection of whether this is a Rust-patched LLVM. This would be used
# in conjunction with either an llvm-config or build.submodules = false.
#llvm-has-rust-patches = if llvm-config { false } else { true }

# Normally the build system can find LLVM's FileCheck utility, but if
# not, you can specify an explicit file name for it.
#llvm-filecheck = "/path/to/llvm-version/bin/FileCheck"
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ impl PartialEq<&str> for TargetSelection {
pub struct Target {
/// Some(path to llvm-config) if using an external LLVM.
pub llvm_config: Option<PathBuf>,
pub llvm_has_rust_patches: Option<bool>,
/// Some(path to FileCheck) if one was specified.
pub llvm_filecheck: Option<PathBuf>,
pub llvm_libunwind: Option<LlvmLibunwind>,
Expand Down Expand Up @@ -729,6 +730,7 @@ define_config! {
default_linker: Option<PathBuf> = "default-linker",
linker: Option<String> = "linker",
llvm_config: Option<String> = "llvm-config",
llvm_has_rust_patches: Option<bool> = "llvm-has-rust-patches",
llvm_filecheck: Option<String> = "llvm-filecheck",
llvm_libunwind: Option<String> = "llvm-libunwind",
android_ndk: Option<String> = "android-ndk",
Expand Down Expand Up @@ -1140,6 +1142,7 @@ impl Config {
if let Some(ref s) = cfg.llvm_config {
target.llvm_config = Some(config.src.join(s));
}
target.llvm_has_rust_patches = cfg.llvm_has_rust_patches;
if let Some(ref s) = cfg.llvm_filecheck {
target.llvm_filecheck = Some(config.src.join(s));
}
Expand Down
12 changes: 7 additions & 5 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::str;

use config::Target;
use filetime::FileTime;
use once_cell::sync::OnceCell;

Expand Down Expand Up @@ -854,12 +855,13 @@ impl Build {
///
/// If no custom `llvm-config` was specified then Rust's llvm will be used.
fn is_rust_llvm(&self, target: TargetSelection) -> bool {
if self.config.llvm_from_ci && target == self.config.build {
return true;
}

match self.config.target_config.get(&target) {
Some(ref c) => c.llvm_config.is_none(),
Some(Target { llvm_has_rust_patches: Some(patched), .. }) => *patched,
Some(Target { llvm_config, .. }) => {
// If the user set llvm-config we assume Rust is not patched,
// but first check to see if it was configured by llvm-from-ci.
(self.config.llvm_from_ci && target == self.config.build) || llvm_config.is_none()
}
None => true,
}
}
Expand Down