Skip to content

Rollup of 10 pull requests #138366

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

Merged
merged 35 commits into from
Mar 12, 2025
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6b29bb6
Prevent ICE in autodiff validation by emitting user-friendly errors
Sa4dUs Mar 2, 2025
9067f7c
Explain weird quirk in user type annotation lowering
compiler-errors Mar 9, 2025
8ab05ad
Do not write user type annotation for const param value path
compiler-errors Mar 9, 2025
ed6dfdd
Do not feed anon const a type that references generics that it does n…
compiler-errors Mar 9, 2025
f525b17
Remove AdtFlags::IS_ANONYMOUS and Copy/Clone condition for anonymous ADT
compiler-errors Mar 10, 2025
02bb2d4
Disable CFI for weakly linked syscalls
1c3t3a Mar 4, 2025
e5dc1e3
Add comments for #[no_sanitize(cfi)] in stdlib
1c3t3a Mar 10, 2025
f38819c
Add some layout tests for pattern type edge cases
oli-obk Jan 30, 2025
916f955
Reject wrapping ranges of pattern types
oli-obk Jan 30, 2025
9d87d4e
Add tests for pattern type literals
oli-obk Jan 29, 2025
f87e58f
Allow int literals for pattern types with int base types
oli-obk Jan 29, 2025
53237c8
Refactor GCC compilation
Kobzol Mar 5, 2025
009aba0
Add `gcc` bootstrap config section
Kobzol Mar 5, 2025
c68a5ec
Add `[gcc] download-ci-gcc` option
Kobzol Mar 5, 2025
3de10b0
Add `download-ci-gcc-stamp` file
Kobzol Mar 5, 2025
bc6302c
Implement downloading GCC from CI
Kobzol Mar 5, 2025
2b1b09c
Add change tracker entry
Kobzol Mar 5, 2025
dcc2b30
Add triagebot entry for GCC modifications
Kobzol Mar 10, 2025
bf58a35
stabilize `ci_rustc_if_unchanged_logic` test for local environments
onur-ozkan Mar 8, 2025
cf8e1f5
Fix ICE for invalid return activity and proper error handling
Sa4dUs Mar 7, 2025
33f9a49
Combine autodiff errors together
Sa4dUs Mar 10, 2025
8546e01
Add individual activity span availability FIXME
Sa4dUs Mar 10, 2025
3846f94
miri native_calls: ensure we actually expose *mutable* provenance to …
RalfJung Mar 11, 2025
ba6c406
let the bodies hit the floor
lcnr Mar 11, 2025
75a69a4
Do not download GCC in tests
Kobzol Mar 11, 2025
8a2e3ac
Rollup merge of #137715 - oli-obk:pattern-type-literals, r=BoxyUwU
matthiaskrgr Mar 11, 2025
9746ac5
Rollup merge of #138002 - 1c3t3a:fix-std-cfi-violation, r=rcvalle
matthiaskrgr Mar 11, 2025
c007d0a
Rollup merge of #138051 - Kobzol:download-ci-gcc, r=onur-ozkan
matthiaskrgr Mar 11, 2025
caa2d00
Rollup merge of #138231 - Sa4dUs:autodiff-ice, r=ZuseZ4
matthiaskrgr Mar 11, 2025
55abd7f
Rollup merge of #138245 - onur-ozkan:ci-rustc-test-fix, r=jieyouxu
matthiaskrgr Mar 11, 2025
4ff58c9
Rollup merge of #138256 - compiler-errors:anon-const-ty, r=BoxyUwU
matthiaskrgr Mar 11, 2025
16ff824
Rollup merge of #138284 - compiler-errors:const-param-ty-annotation, …
matthiaskrgr Mar 11, 2025
954b88e
Rollup merge of #138296 - compiler-errors:deanonymous, r=lcnr
matthiaskrgr Mar 11, 2025
4feb866
Rollup merge of #138352 - RalfJung:miri-native-calls-exposed, r=oli-obk
matthiaskrgr Mar 11, 2025
4c1a186
Rollup merge of #138354 - lcnr:goodbye-TypeVerifier, r=compiler-errors
matthiaskrgr Mar 11, 2025
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
Do not download GCC in tests
  • Loading branch information
Kobzol committed Mar 11, 2025
commit 75a69a48f3aebaaa7cb3ce2ffcd3816f10895f70
20 changes: 14 additions & 6 deletions src/bootstrap/src/core/build_steps/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ use std::path::{Path, PathBuf};
use std::sync::OnceLock;

use build_helper::ci::CiEnv;
use build_helper::git::get_closest_merge_commit;

use crate::Config;
use crate::core::builder::{Builder, Cargo, Kind, RunConfig, ShouldRun, Step};
use crate::core::config::{GccCiMode, TargetSelection};
use crate::core::config::TargetSelection;
use crate::utils::build_stamp::{BuildStamp, generate_smart_stamp_hash};
use crate::utils::exec::command;
use crate::utils::helpers::{self, t};
Expand Down Expand Up @@ -93,9 +91,10 @@ pub enum GccBuildStatus {
/// Tries to download GCC from CI if it is enabled and GCC artifacts
/// are available for the given target.
/// Returns a path to the libgccjit.so file.
#[cfg(not(test))]
fn try_download_gcc(builder: &Builder<'_>, target: TargetSelection) -> Option<PathBuf> {
// Try to download GCC from CI if configured and available
if !matches!(builder.config.gcc_ci_mode, GccCiMode::DownloadFromCi) {
if !matches!(builder.config.gcc_ci_mode, crate::core::config::GccCiMode::DownloadFromCi) {
return None;
}
if target != "x86_64-unknown-linux-gnu" {
Expand All @@ -114,6 +113,11 @@ fn try_download_gcc(builder: &Builder<'_>, target: TargetSelection) -> Option<Pa
Some(root.join("libgccjit.so"))
}

#[cfg(test)]
fn try_download_gcc(_builder: &Builder<'_>, _target: TargetSelection) -> Option<PathBuf> {
None
}

/// This returns information about whether GCC should be built or if it's already built.
/// It transparently handles downloading GCC from CI if needed.
///
Expand Down Expand Up @@ -247,12 +251,16 @@ pub fn add_cg_gcc_cargo_flags(cargo: &mut Cargo, gcc: &GccOutput) {
}

/// The absolute path to the downloaded GCC artifacts.
fn ci_gcc_root(config: &Config) -> PathBuf {
#[cfg(not(test))]
fn ci_gcc_root(config: &crate::Config) -> PathBuf {
config.out.join(config.build).join("ci-gcc")
}

/// This retrieves the GCC sha we *want* to use, according to git history.
fn detect_gcc_sha(config: &Config, is_git: bool) -> String {
#[cfg(not(test))]
fn detect_gcc_sha(config: &crate::Config, is_git: bool) -> String {
use build_helper::git::get_closest_merge_commit;

let gcc_sha = if is_git {
get_closest_merge_commit(
Some(&config.src),
Expand Down
Loading