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

Ensure that static_crt is set in the bootstrapper whenever using cc-rs to get a compiler command line. #98434

Merged
merged 1 commit into from
Jun 29, 2022

Commits on Jun 27, 2022

  1. Ensure that static_crt is set in the bootstrapper whenever using `c…

    …c` to get a compiler command line.
    
    When attempting to build rustc with LLVM on Windows, I noticed that the CRT flag provided to the C and C++ Compilers was inconsistent:
    
    ```
    "-DCMAKE_C_FLAGS=-nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS=-nologo -MD -Brepro"
    ```
    
    Since the bootstrapper also sets the various `LLVM_USE_CRT` variables, this resulted in cl.exe reporting a bunch of warnings:
    
    ```
    cl : Command line warning D9025 : overriding '/MD' with '/MT'
    ```
    
    The root cause for this is that `cc_detect::find` was creating a `cc::Build` twice, but didn't set `static_crt` the second time.
    
    It's possible that this what is also causing rust-lang#81381
    dpaoliello committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    1fca246 View commit details
    Browse the repository at this point in the history