You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linker scripts in cc_library deps missing from sandbox #807
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.
Only the following symlinks exist under bazel 10.0’s link-time sandbox, under ~/.cache/bazel/_bazel_user/3f57239b7854dc2d2a7465a30e6c1cb3/bazel-sandbox/2101481633161564656/execroot/__main__$ :
There’s a few related issues, as well as several replies that indicate an expectation for this to work: #184 #716 (note: this was filed about propagation to cc_binary) #4440
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.
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.
Activity
tjurkiewicz commentedon Aug 20, 2016
Since cc_toolchain is not officially docummented, could you please describe, how exactly you use the cc_toolchain rule ?
philwo commentedon Dec 9, 2016
Is this still an issue? If yes, please kindly re-open this bug with a small example on how to reproduce this. :)
jnewton-sx commentedon Feb 22, 2018
@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
~/.cache/bazel/_bazel_user/3f57239b7854dc2d2a7465a30e6c1cb3/bazel-sandbox/2101481633161564656/execroot/__main__$:There’s a few related issues, as well as several replies that indicate an expectation for this to work:
#184
#716 (note: this was filed about propagation to cc_binary)
#4440
philwo commentedon Feb 22, 2018
@mhlopko Seems like these files are missing from the inputs of C++ link actions? WDYT?
hlopko commentedon Feb 23, 2018
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.
philwo commentedon Jul 19, 2018
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.
hlopko commentedon Jul 19, 2018
cc @oquenchil
keithwyss commentedon Nov 6, 2018
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.
hlopko commentedon Dec 14, 2018
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.