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

feat: shared headers, rules_cc support #221

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

Commits on Jan 6, 2024

  1. feat: shared headers, rules_cc support

    This changeset adds `out_headers` and `additional_outputs`, which,
    together, allow a developer to add additional outputs to a regular
    `native_image` build.
    
    Because a header is generated per C entrypoint class, the developer
    needs to be able to declare as many as they want.
    
    Additionally, a `CcInfo` provider needs to be returned from the
    `native_image` target to facilitate downsream support for `rules_cc`
    targets.
    
    - feat: add `out_headers` and `additional_outputs` attributes
    - feat: add `default_outputs` attribute to opt-out of new behavior
    - feat: resolve and add `CcInfo` to shared library targets
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    c4188b4 View commit details
    Browse the repository at this point in the history
  2. fix: restore cpp toolchain symbol for classic rules

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    b6c47ef View commit details
    Browse the repository at this point in the history
  3. fix: inclusion of native jvm headers in native-image builds

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    4e0f1bf View commit details
    Browse the repository at this point in the history
  4. chore: relock bazel mods

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    55af619 View commit details
    Browse the repository at this point in the history
  5. fix: provide GRAALVM_HOME to native-image builds

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    62d95e5 View commit details
    Browse the repository at this point in the history
  6. fix: gvm home parameter in classic rules

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    7b53b59 View commit details
    Browse the repository at this point in the history
  7. fix: off-by-one in graalvm home path

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    9d6d956 View commit details
    Browse the repository at this point in the history
  8. fix: include data attribute in direct inputs

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    223e0b8 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2024

  1. feat: makevar expansion for extra_args

    Adds Makefile variable expansion support to the `extra_args` flags
    passed to `native-image`.
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    ed40131 View commit details
    Browse the repository at this point in the history
  2. feat: makevar expansion pt2, managed build tmpdir

    - feat: full implementation this time of make variable and location
      expansion
    
    - feat: managed build temp directory for `native-image`
    
    Relates-To: #244
    Relates-To: #245
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 13, 2024
    Configuration menu
    Copy the full SHA
    fb6a8e2 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2024

  1. feat: initial work on shared native image rule

    - create base attributes, split into main/shared target attrs
    - create new macro and rules
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    2a70e11 View commit details
    Browse the repository at this point in the history
  2. feat: modular native builds

    - support `main_module` attribute
    - format with `main_module` attr if present
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    3383a37 View commit details
    Browse the repository at this point in the history
  3. fix: override native image tmpdir for shared libs

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    e5ec856 View commit details
    Browse the repository at this point in the history
  4. feat: implement strict attribute

    - provide `strict` attribute in all `native_image` rules
    - inject `strict` arguments according to latest gvm version
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    ebfc421 View commit details
    Browse the repository at this point in the history
  5. feat: multi-config attributes

    - add multi-label variants of config file attribuets for resources,
      jni, and so on
    
    - disallow use of singular and plural attributes together in one
      target definition
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    dd5f4a4 View commit details
    Browse the repository at this point in the history
  6. fix: provide genfiles dir to native image env

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    36befe6 View commit details
    Browse the repository at this point in the history
  7. feat: better debug build experience

    - don't delete local symbols for `debug` builds
    - enable source-level debugging by default for `debug` builds
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    19e679d View commit details
    Browse the repository at this point in the history
  8. feat: implement support for output groups

    - add common enum for output group names
    - add named output group for shared library headers
    - use default output group for binary or shared library
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    bb3ae0a View commit details
    Browse the repository at this point in the history
  9. feat: support for neverlink

    - add transitive inputs for compile-time jars
    - mark applicable dependencies with `neverlink`
    
    Relates-To: #243
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    b61399c View commit details
    Browse the repository at this point in the history
  10. chore: update blzmod lock

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    85cfed7 View commit details
    Browse the repository at this point in the history
  11. fix: don't pull in jvm external from main rule entrypoint

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    f3a8030 View commit details
    Browse the repository at this point in the history
  12. fix: don't provide UnlockExperimentalOptions yet

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    e36ba06 View commit details
    Browse the repository at this point in the history
  13. chore: update blzmod lock

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    167d4f6 View commit details
    Browse the repository at this point in the history
  14. fix: artifact options with structs

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    811d5fe View commit details
    Browse the repository at this point in the history
  15. fix: proper print for debug message

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    ca03088 View commit details
    Browse the repository at this point in the history
  16. fix: main_class not available for shared libraries

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    2ed1f4f View commit details
    Browse the repository at this point in the history
  17. test: move to new native_image_shared_library rule

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    1e9c24b View commit details
    Browse the repository at this point in the history
  18. feat: ability to move specific deps to modulepath

    - add new `module_deps` attribute
    - add example of modular java use
    - wire in `main_module` attribute
    - process into separate module path (direct only)
    - append to `native-image` invocation as `--module-path`
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    5c674d1 View commit details
    Browse the repository at this point in the history
  19. chore: build locally with strict java deps

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    442935d View commit details
    Browse the repository at this point in the history
  20. chore: add local example for shared library use

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    db9f530 View commit details
    Browse the repository at this point in the history
  21. fix: native example reflection config

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    b9ce2c0 View commit details
    Browse the repository at this point in the history
  22. fix: don't append -bin suffix to shared libs

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    1e79b60 View commit details
    Browse the repository at this point in the history
  23. chore: add third_party target for jacoco

    Relates-To: #220
    Relates-To: bazelbuild/bazel#12714
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    a186a27 View commit details
    Browse the repository at this point in the history
  24. fix: sdk artifact coordinate

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    53686ca View commit details
    Browse the repository at this point in the history
  25. chore: update bzlmod locks

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    1aefe81 View commit details
    Browse the repository at this point in the history
  26. chore: drop old disabled tests

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    1662194 View commit details
    Browse the repository at this point in the history
  27. chore: add nativeimage artifact

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    2dcad3f View commit details
    Browse the repository at this point in the history
  28. chore: adopt new attr structure in macro entrypoints

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    8188160 View commit details
    Browse the repository at this point in the history
  29. feat: native junit testing

    - add rule and macro definition/entrypoint for test targets
    - rollup test targets dependencies in native image build
    - inject native test feature, runner as entrypoint
    - provide dependencies for junit5
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    a5b91cc View commit details
    Browse the repository at this point in the history
  30. chore: relock bzlmod for tests

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    454dc5c View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. fix: expansion of profiles attr

    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    72d7f6b View commit details
    Browse the repository at this point in the history