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

"link_extra_lib" does not have any effect if "linkshared = True" on cc_binary #25079

Open
carlosgalvezp opened this issue Jan 27, 2025 · 0 comments
Labels

Comments

@carlosgalvezp
Copy link

Description of the bug:

I'm trying to use link_extra_lib to link against my C++ runtime environment (a cc_library containing my custom libstdc++.so). This works for regular cc_binaries and cc_tests. However, it does not work for shared libraries, i.e. cc_binary with link_shared=True.

It appears it might be due to this code:

if "linkshared" not in kwargs or not kwargs["linkshared"]:

It's however unclear why this restriction applies. Could this be clarified/fixed?

Which category does this issue belong to?

C++ Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

Ubuntu 24.04

What is the output of bazel info release?

release 7.4.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?


If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

Asked on Slack and got the suggestion to file an issue.

Any other information, logs, or outputs that you want to share?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants