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
Are linkopts propagated from copts and/or deps ? #7288
Comments
|
@jart Have you seen this before? |
Since copts and linkopts are viral and propagate to dependencies, If linking against BoringSSL for an Android build is genuinely a good thing to do, then this could be a bug. Hey @petewarden what's the correct way to get SSL functionality for Android code? Should our friend be using a different library? Unrelated suggestions:
Just name it
Many of these flags might already be inherited from the The Bazel should already pass flags like Another thing to note is that |
@jart Thank you for your answer. I think a similar question is discussed here. but I don't understand proposed solution, can you help me ?
You are right, only |
@riless @jart
which would necessitate adding a config setting like so:
The only other workaround I know of that doesn't require editing the other repository is to create a dummy libpthread.so target, but that's pretty hacky. |
I'd like to go with the dummy libpthread.so target solution. I don't know how to do this. I've tried to add a target like this.
And added it to deps of libfoo.so
but I still have the |
@riless See cd53f3c#diff-06b90d704990e9b4f5adadb18c837b64 This has since been removed, as obviously for a long-term solution it was preferable to fix the protobuf source instead. If we need boringssl on Android builds we should do the same for that as well. |
@andrewharp it works now, thank you. I'll still go with this solution as I want boringssl to be downloaded on build. |
The linker complains about not finding
-lpthread
, while I didn't add this flag to linkopts.I've checked the executed command, and in fact there is extra flags on it
-lz -lpthread ...
.Where did they came from ? Is there a workaround for this ?
More details
BUILD file
Command
bazel build -c opt //:libfoo.so --crosstool_top=//external:android/crosstool --cpu=armeabi-v7a --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --verbose_failures --sandbox_debug --strategy=CppLink=standalone
Full error
The text was updated successfully, but these errors were encountered: