-
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
Unknown option --start-lib on OSX when compiling TreeArtifacts using cc_library #6309
Comments
Hmm I know what's going on. We assume that tree artifacts (that what declare_directory creates) get compiled into a list of objects, but we never create linking action for them, we take them as a list, and therefore we implicitly depend on support for |
Is there a workaround you can think of? I tried implementing a custom C++ rule with the cc_common API, but got stuck (see my stack overflow question here). |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
I just ran into this trying to use https://github.com/kkiningh/rules_verilator on macos. |
This is still a problem when trying to use a mingw toolchain on windows (e.g. winlibs or w64devkit prebuilt toolchains). Any update on this? |
Description of the problem:
When
cc_library
depends on a directory that contains C++ source files (created through declare_directory) Bazel emits the linker option--start-lib
which is undefined for clang on OSX.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I have a minimal example in this repo.
What operating system are you running Bazel on?
What's the output of
bazel info release
?release 0.18.0rc8
Have you found anything relevant by searching the web?
There were some previous issues with
--start-lib
on OSX (see #2502), but I think my issue is different since I have no problem building otherwise. There is also an issue with tree artifacts leading to inconstant builds (see #5785).The text was updated successfully, but these errors were encountered: