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

Emit warning if rustc --print=native-static-libs reports a library dependency that has not been listed statically #3

Closed
4 tasks
AndrewGaspar opened this issue Mar 11, 2018 · 2 comments

Comments

@AndrewGaspar
Copy link
Collaborator

AndrewGaspar commented Mar 11, 2018

EDIT: I think compile-time derivation of the link requirements is intractible. It would force CMake to re-determine the graph at build time, which is almost certainly not possible. Instead, we should just emit a warning if we notice that rustc lists a static library dependency that has not been listed in the CMake file.

Things to do:

  • Capture the stdlib static library dependencies on all supported platforms
  • Add a NO_STD option (or derive this from the crate, if possible) to add_crate that opts out of linking against those static libraries
    • If Cargo allowed this to be specified in the TOML file, could be automatically derived
  • Capture the results of rustc --print=native-static-libs
@AndrewGaspar
Copy link
Collaborator Author

@AndrewGaspar AndrewGaspar changed the title Derive INTERFACE_LINK_LIBRARIES from cargo rustc -- --print=native-static-libs Emit warning if rustc --print=native-static-libs reports a library dependency that has not been listed statically Mar 13, 2018
@AndrewGaspar
Copy link
Collaborator Author

This probably isn't necessary since cargo_link_libraries is used to link local dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant