Skip to content
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

Update cc crate for bootstrap to v1.0.97 #122504

Merged
merged 1 commit into from
May 7, 2024

Commits on May 6, 2024

  1. Update version of cc crate to v1.0.97

    Reason:
    
    In order to build the Windows version of the Rust toolchain for the Android platform, the following patch to the cc is crate is required to avoid incorrectly determining that we are building with the Android NDK: rust-lang/cc-rs@57853c4
    
    This patch is present in version 1.0.80 and newer versions of the cc crate. The rustc source distribution currently has 3 different versions of cc in the vendor directory, only one of which has the necessary fix.
    
    We (the Android Rust toolchain) are currently maintaining local patches to upgrade the cc crate dependency versions, which we would like to upstream.
    
    Furthermore, beyond the specific reason, the cc crate in bootstrap is currently pinned at an old version due to problems in the past when trying to update it. It is worthwhile to figure out and resolve these problems so we can keep the dependency up-to-date.
    
    Other fixes:
    
    As of cc v1.0.78, object files are prefixed with a 16-character hash.
    Update src/bootstrap/src/core/build_steps/llvm.rs to account for this to
    avoid failures when building libunwind and libcrt. Note that while the hash
    prefix was introduced in v1.0.78, in order to determine the names of the
    object files without scanning the directory, we rely on the compile_intermediates
    method, which was introduced in cc v1.0.86
    
    As of cc v1.0.86, compilation on MacOS uses the -mmacosx-version-min flag.
    A long-standing bug in the CMake rules for compiler-rt causes compilation
    to fail when this flag is specified. So we add a workaround to suppress this
    flag.
    
    Updating to cc v1.0.91 and newer requires fixes to bootstrap unit tests.
    The unit tests use targets named "A", "B", etc., which fail a validation
    check introduced in 1.0.91 of the cc crate.
    jfgoog committed May 6, 2024
    Configuration menu
    Copy the full SHA
    615b485 View commit details
    Browse the repository at this point in the history