-
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
*.ldscript file will not propagate to the final step when linking #716
Comments
It would help if you could show the libldscript rule. I think the most On Tue, Dec 15, 2015 at 5:26 AM, David Hu notifications@github.com wrote:
|
lib.ldscript content:
I know the file extension requirement in deps (*.ld, *lds, *.ldscript). |
In the email I got, it said ":libldscript" not ":lib.ldscript". Well, it does sound like a bug. |
It does behave weird for me. I think the "-Wl,--version-script" argument should only present when linking the "lib". However, it shown up when "hello" is linked. Thus, the lib.ldscript is not in the sandbox at that moment.(I guess) |
Hi! |
Moved the linker script dependency to a dependency of i386. Added --spawn_strategy=standalone to the qemu.sh script. Unfortunately, there is a bug in bazel seen here, bazelbuild/bazel#716, that requires sandboxing to be disabled to allow the linker script dependency to persist to the main kernel dependency. It's not ideal but if they ever fix this bug, the code as is should function with sandboxing.
CC @oquenchil |
FWIW, I'm seeing this work correctly when used a little differently. The specific case: I'm passing "-Wl,--version-script,$(location example.ldscript)" into a cc_library's linkopts, and seeing things get compiled correctly by an android_binary that indirectly depends on it. |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
Assume all files were placed & edited properly.
This will be fine :
$> bazel build //:lib
This will cause gcc error (lib.ldscript: No such file or directory) :
$> bazel build //:hello
However, if I add ":lib.ldscript" to the deps of "hello". I will not get the error.
But from encapsulated perspective, "hello" should not take care of this information.(The linker script is for "lib" only)
I guess this is because Bazel link all the objects/files in th last steps & the *.ldscript in deps is not propagated to the cc_binary(hello) when linking.
Is this a bug or WAD? Thanks.
The text was updated successfully, but these errors were encountered: