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

Pass C++ runtime lib when C++ toolchain declares it #562

Merged
merged 2 commits into from
Feb 9, 2021

Commits on Feb 5, 2021

  1. Pass C++ runtime lib when C++ toolchain declares it

    Currently `rules_rust` won't link against the C++ standard library in case
    C++ toolchain is the `static_link_cpp_runtimes` feature (therefore when
    it uses `cc_toolchain.static_runtime_lib` and `cc_toolchain.dynamic_runtime_lib`
    attributes to declare which version of C++ static library should be
    linked into the final binary).
    
    This PR modifies `get_libs_for_static_executable` to also look into the
    C++ toolchain and depend on C++ standard library from there.
    
    Once we implement the support for dynamically linked rust binaries we
    will likely have an equivalend `get_libs_for_dynamic_executable`, which
    would then look into `cc_toolchain.dynamic_runtime_lib`.
    
    While there, I moved the `get_cc_toolchain` function to the `utils.rs`,
    to be consistent with the handling of the Rust toolchain.
    hlopko committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    8ac6e3a View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2021

  1. Configuration menu
    Copy the full SHA
    10bfa5b View commit details
    Browse the repository at this point in the history