Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5824ab1
Support lists and stylings in more places for `rustc --explain`
Alexendoo Jun 26, 2024
632f013
rewrite lto-linkage-used-attr to rmake
Oneirical Jul 19, 2024
f307287
rewrite no-duplicate-libs to rmake
Oneirical Jul 19, 2024
c3d3d6f
Fix inclusion of `wasm-component-ld` in dist artifacts
alexcrichton Jul 22, 2024
6d9d605
rewrite pgo-gen-no-imp-symbols to rmake
Oneirical Jul 19, 2024
e8e6111
Migrate `run-make/link-framework` to `rmake.rs`
GuillaumeGomez Jun 24, 2024
7e0c203
Add new `MSVC_LIB_PATH` runtest environment variable to know location…
GuillaumeGomez Jun 2, 2024
b7495b4
Note closure captures when reporting deferred cast to fn ptr failed
compiler-errors Jul 23, 2024
84eee68
Add `run_make_support::build_native_static_lib` function
GuillaumeGomez Jun 2, 2024
5257ca7
Migrate `run-make/issue-15460` to `rmake.rs`
GuillaumeGomez Jun 2, 2024
3de5252
Rename `tests/run-make/issue-15460` into `tests/run-make/link-native-…
GuillaumeGomez Jun 2, 2024
d4f3673
make it possible to disable download-rustc if it's incompatible
onur-ozkan Jul 23, 2024
9d4daf8
Rollup merge of #125886 - GuillaumeGomez:migrate-run-make-issue-15460…
matthiaskrgr Jul 23, 2024
f1a29ee
Rollup merge of #126898 - GuillaumeGomez:migrate-run-make-link-framew…
matthiaskrgr Jul 23, 2024
8e206c0
Rollup merge of #126994 - Alexendoo:explain-markdown, r=tgross35
matthiaskrgr Jul 23, 2024
f34237f
Rollup merge of #127990 - Oneirical:ii-the-high-priestest, r=jieyouxu
matthiaskrgr Jul 23, 2024
417bdc7
Rollup merge of #128060 - alexcrichton:include-wasm-component-ld-for-…
matthiaskrgr Jul 23, 2024
c2ba4b1
Rollup merge of #128082 - compiler-errors:closure-cap, r=estebank
matthiaskrgr Jul 23, 2024
041b8c4
Rollup merge of #128098 - onur-ozkan:incompatible-option-behaviour, r…
matthiaskrgr Jul 23, 2024
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
make it possible to disable download-rustc if it's incompatible
Primarily needed by CI runners to avoid handling download-rustc incompatible
options one by one on shell scripts.

Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Jul 23, 2024
commit d4f3673a54fecf005920ef2fffd5e1f78cc87b85
36 changes: 25 additions & 11 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1570,11 +1570,22 @@ impl Config {
let mut is_user_configured_rust_channel = false;

if let Some(rust) = toml.rust {
config.download_rustc_commit =
config.download_ci_rustc_commit(rust.download_rustc.clone());

if config.download_rustc_commit.is_some() {
check_incompatible_options_for_ci_rustc(&rust);
if let Some(commit) = config.download_ci_rustc_commit(rust.download_rustc.clone()) {
// Primarily used by CI runners to avoid handling download-rustc incompatible
// options one by one on shell scripts.
let disable_ci_rustc_if_incompatible =
env::var_os("DISABLE_CI_RUSTC_IF_INCOMPATIBLE")
.is_some_and(|s| s == "1" || s == "true");

if let Err(e) = check_incompatible_options_for_ci_rustc(&rust) {
if disable_ci_rustc_if_incompatible {
config.download_rustc_commit = None;
} else {
panic!("{}", e);
}
} else {
config.download_rustc_commit = Some(commit);
}
}

let Rust {
Expand Down Expand Up @@ -2614,14 +2625,15 @@ impl Config {

/// Checks the CI rustc incompatible options by destructuring the `Rust` instance
/// and makes sure that no rust options from config.toml are missed.
fn check_incompatible_options_for_ci_rustc(rust: &Rust) {
fn check_incompatible_options_for_ci_rustc(rust: &Rust) -> Result<(), String> {
macro_rules! err {
($name:expr) => {
assert!(
$name.is_none(),
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`.",
stringify!($name).replace("_", "-")
);
if $name.is_some() {
return Err(format!(
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`.",
stringify!($name).replace("_", "-")
));
}
};
}

Expand Down Expand Up @@ -2717,6 +2729,8 @@ fn check_incompatible_options_for_ci_rustc(rust: &Rust) {
warn!(channel);
warn!(description);
warn!(incremental);

Ok(())
}

fn set<T>(field: &mut T, val: Option<T>) {
Expand Down