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

Shared libraries with C/C++ targets #226

Open
sgammon opened this issue Jan 2, 2024 · 2 comments · May be fixed by #221
Open

Shared libraries with C/C++ targets #226

sgammon opened this issue Jan 2, 2024 · 2 comments · May be fixed by #221
Assignees
Labels
feature Mainline feature work native-image Features and issues relating to the Native Image tool
Milestone

Comments

@sgammon
Copy link
Owner

sgammon commented Jan 2, 2024

When building a Native Image as a shared library, users will want to make use of those outputs downstream, most obviously in cc_* targets.

The following would be great:

// imports...

native_image(
  name = "my-image",
  shared_library = True,
  // ...
)

cc_binary(
  name = "some-binary",
  deps = [
    ":my-image",
    // ...
  ],
  // ...
)

# bazel build //:some-binary

To support this, we'll need to ship providers with Native Image targets that build shared libraries, so that downstream rules can resolve the generated library and headers.

@sgammon sgammon added feature Mainline feature work native-image Features and issues relating to the Native Image tool labels Jan 2, 2024
@sgammon sgammon added this to the 1.0.0 milestone Jan 2, 2024
@sgammon sgammon linked a pull request Jan 2, 2024 that will close this issue
13 tasks
@sgammon sgammon changed the title Support for use with C/C++ targets Shared libraries with C/C++ targets Jan 2, 2024
@sgammon
Copy link
Owner Author

sgammon commented Jan 2, 2024

part of #121

@sgammon
Copy link
Owner Author

sgammon commented Jan 14, 2024

It's unclear which providers we need to make this work seamlessly, but, for the moment, it's worth looking at transitive_native_libraries (part of the JavaInfo provider).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Mainline feature work native-image Features and issues relating to the Native Image tool
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants