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

Support alwayslink for linking with clang? #1271

Open
keith opened this issue Apr 19, 2022 · 0 comments · May be fixed by #2647
Open

Support alwayslink for linking with clang? #1271

keith opened this issue Apr 19, 2022 · 0 comments · May be fixed by #2647

Comments

@keith
Copy link
Member

keith commented Apr 19, 2022

When linking rust libraries into a final C/C++ binary, sometimes you may need a library to be force loaded in order to include symbols that may otherwise not be referenced, for example if you're interfacing with the JNI. This can be controlled in bazel by passing alwayslink = True/False to cc_common.create_library_to_link. Should the rules expose a alwayslink attribute, similar to cc_library and others, to control this? I'm happy to submit this if so. I'm not sure how this interacts with #637 and #1268 since they mostly seem to focus on binaries being linked with rustc, and not clang

@cerisier cerisier linked a pull request May 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants