-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Linker scripts in cc_library deps missing from sandbox #807
Comments
Since cc_toolchain is not officially docummented, could you please describe, how exactly you use the cc_toolchain rule ? |
Is this still an issue? If yes, please kindly re-open this bug with a small example on how to reproduce this. :) |
@philwo please re-open this issue, it is still an issue and I have an example that reproduces it. It prevents using -Wl,--version-script in linkopts. Test case:
Works with --spawn_strategy=standalone, otherwise produces:
Only the following symlinks exist under bazel 10.0’s link-time sandbox, under
There’s a few related issues, as well as several replies that indicate an expectation for this to work: |
@mhlopko Seems like these files are missing from the inputs of C++ link actions? WDYT? |
Looks like dup of #716, the workaround is to only use linker scripts on cc_binary, that's how this feature was intended to be used. |
I'm closing this again and unassigning it from me. It is definitely not a sandbox issue, but it might be a C++ rules issue. If it's actually a problem (but I understand @mhlopko so that this is working as intended), then please reopen. |
cc @oquenchil |
What's the reason that ldscripts should only work with cc_binary rules @mhlopko and not with cc_library rules? I'd like to understand this better and whether our team is holding it wrong. |
ldscripts were meant to be used to give more precise control into symbols visibility/stripping. And that makes sense for cc_binaries only. But I agree that #716 should be fixed somehow. |
In #184, we added support for linker scripts (.ld and .lds files) to cc_library's "deps" attribute. However, these don't appear to be mounted to the sandbox.
As a short-term workaround, I put my linker scripts in a filegroup and included that in the linker_files attribute of the appropriate cc_toolchain.
The text was updated successfully, but these errors were encountered: