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

Draft: Propagate rustc native-static-libs to CMake #472

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Commits on Sep 5, 2024

  1. Propagate rustc native-static-libs to CMake

    CMake usually requires all libraries required for linking to be
    specified at CMake configure time. However, in Rust native dependencies
    may be specified inside the source code via the [`link`] attribute.
    `rustc` can be instructed to print all required native libraries at
    build time, however this is already after the CMake configure stage
    has finished. To work around this we wrap the build command for Rust
    static libraries in a wrapper script, that parses the required libraries
    from the `rustc` output and writes them into an `rsp` file.
    At configure time we can then instruct CMake to read the linker
    arguments from the file that our wrapper will generate later at build
    time.
    
    [`link`]: https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute
    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    4c8ebb4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5392e5a View commit details
    Browse the repository at this point in the history
  3. test

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    5e02c27 View commit details
    Browse the repository at this point in the history
  4. wip: test native static libs

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    e7f1bc9 View commit details
    Browse the repository at this point in the history
  5. use target_link_options again

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    96f210f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4b2c789 View commit details
    Browse the repository at this point in the history
  7. try list join

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    d784810 View commit details
    Browse the repository at this point in the history
  8. read rsp file contents again

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    28c49da View commit details
    Browse the repository at this point in the history
  9. add backticks to message

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    54d8e99 View commit details
    Browse the repository at this point in the history
  10. Disable color

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    275dc81 View commit details
    Browse the repository at this point in the history
  11. try using -Wl

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    5268f88 View commit details
    Browse the repository at this point in the history
  12. revert back to link options

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    7103869 View commit details
    Browse the repository at this point in the history
  13. try to fix msvc

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    0a22ba2 View commit details
    Browse the repository at this point in the history
  14. try to fix msvc

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    90b9149 View commit details
    Browse the repository at this point in the history
  15. try non shell path

    jschwe committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    0a2758a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    9061782 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. test msvc /link

    jschwe committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    0cbe37f View commit details
    Browse the repository at this point in the history