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

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c4188b4
feat: shared headers, `rules_cc` support
sgammon Jan 2, 2024
b6c47ef
fix: restore cpp toolchain symbol for classic rules
sgammon Jan 2, 2024
4e0f1bf
fix: inclusion of native jvm headers in `native-image` builds
sgammon Jan 5, 2024
55af619
chore: relock bazel mods
sgammon Jan 5, 2024
62d95e5
fix: provide `GRAALVM_HOME` to `native-image` builds
sgammon Jan 5, 2024
7b53b59
fix: gvm home parameter in classic rules
sgammon Jan 5, 2024
9d6d956
fix: off-by-one in graalvm home path
sgammon Jan 5, 2024
223e0b8
fix: include `data` attribute in direct inputs
sgammon Jan 5, 2024
ed40131
feat: makevar expansion for `extra_args`
sgammon Jan 13, 2024
fb6a8e2
feat: makevar expansion pt2, managed build tmpdir
sgammon Jan 13, 2024
2a70e11
feat: initial work on shared native image rule
sgammon Jan 14, 2024
3383a37
feat: modular native builds
sgammon Jan 14, 2024
e5ec856
fix: override native image tmpdir for shared libs
sgammon Jan 14, 2024
ebfc421
feat: implement `strict` attribute
sgammon Jan 14, 2024
dd5f4a4
feat: multi-config attributes
sgammon Jan 14, 2024
36befe6
fix: provide genfiles dir to native image env
sgammon Jan 14, 2024
19e679d
feat: better `debug` build experience
sgammon Jan 14, 2024
bb3ae0a
feat: implement support for output groups
sgammon Jan 14, 2024
b61399c
feat: support for `neverlink`
sgammon Jan 14, 2024
85cfed7
chore: update blzmod lock
sgammon Jan 14, 2024
f3a8030
fix: don't pull in jvm external from main rule entrypoint
sgammon Jan 14, 2024
e36ba06
fix: don't provide UnlockExperimentalOptions yet
sgammon Jan 14, 2024
167d4f6
chore: update blzmod lock
sgammon Jan 14, 2024
811d5fe
fix: artifact options with structs
sgammon Jan 14, 2024
ca03088
fix: proper `print` for debug message
sgammon Jan 14, 2024
2ed1f4f
fix: `main_class` not available for shared libraries
sgammon Jan 14, 2024
1e9c24b
test: move to new `native_image_shared_library` rule
sgammon Jan 14, 2024
5c674d1
feat: ability to move specific deps to `modulepath`
sgammon Jan 14, 2024
442935d
chore: build locally with strict java deps
sgammon Jan 14, 2024
db9f530
chore: add local example for `shared` library use
sgammon Jan 14, 2024
b9ce2c0
fix: `native` example reflection config
sgammon Jan 14, 2024
1e79b60
fix: don't append `-bin` suffix to shared libs
sgammon Jan 14, 2024
a186a27
chore: add `third_party` target for `jacoco`
sgammon Jan 14, 2024
53686ca
fix: sdk artifact coordinate
sgammon Jan 14, 2024
1aefe81
chore: update bzlmod locks
sgammon Jan 14, 2024
1662194
chore: drop old disabled tests
sgammon Jan 14, 2024
2dcad3f
chore: add `nativeimage` artifact
sgammon Jan 14, 2024
8188160
chore: adopt new attr structure in macro entrypoints
sgammon Jan 14, 2024
a5b91cc
feat: native junit testing
sgammon Jan 14, 2024
454dc5c
chore: relock bzlmod for tests
sgammon Jan 14, 2024
72d7f6b
fix: expansion of profiles attr
sgammon Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 105 additions & 11 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ GRAALVM_DIST = "ce"

GRAALVM_SDK_VERSION = "23.1.1"

GRAALVM_JUNIT_VERSION = "0.9.28"

JUNIT4_VERSION = "4.12"

JUNIT5_VERSION = "5.10.0"

JUNIT5_PLATFORM_VERSION = "1.10.0"


##
## Dependencies: API
Expand Down Expand Up @@ -137,10 +145,101 @@ bazel_dep(
# rules_jvm_external
################################################################################

MAVEN_ARTIFACTS = [
"org.graalvm.nativeimage:svm:%s" % GRAALVM_SDK_VERSION,
"org.graalvm.sdk:graal-sdk:%s" % GRAALVM_SDK_VERSION,
"org.graalvm.polyglot:polyglot:%s" % GRAALVM_SDK_VERSION,
maven = use_extension(
"@rules_jvm_external//:extensions.bzl",
"maven",
dev_dependency = True,
)

# GraalVM.
maven.artifact(
name = "maven_gvm",
group = "org.graalvm.nativeimage",
artifact= "svm",
version = GRAALVM_SDK_VERSION,
neverlink = True,
)
maven.artifact(
name = "maven_gvm",
group = "org.graalvm.sdk",
artifact= "graal-sdk",
version = GRAALVM_SDK_VERSION,
neverlink = True,
)
maven.artifact(
name = "maven_gvm",
group = "org.graalvm.sdk",
artifact= "nativeimage",
version = GRAALVM_SDK_VERSION,
neverlink = True,
)
maven.artifact(
name = "maven_gvm",
group = "org.graalvm.polyglot",
artifact = "polyglot",
version = GRAALVM_SDK_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.graalvm.polyglot",
artifact = "polyglot",
version = GRAALVM_SDK_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.graalvm.buildtools",
artifact = "junit-platform-native",
version = GRAALVM_JUNIT_VERSION,
)

# JUnit 4.
maven.artifact(
name = "maven_gvm",
group = "junit",
artifact = "junit",
version = JUNIT4_VERSION,
)

# JUnit 5.
maven.artifact(
name = "maven_gvm",
group = "org.junit.jupiter",
artifact = "junit-jupiter-api",
version = JUNIT5_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.junit.jupiter",
artifact = "junit-jupiter-engine",
version = JUNIT5_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.junit.jupiter",
artifact = "junit-jupiter-params",
version = JUNIT5_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.junit.platform",
artifact = "junit-platform-console",
version = JUNIT5_PLATFORM_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.junit.platform",
artifact = "junit-platform-commons",
version = JUNIT5_PLATFORM_VERSION,
)
maven.artifact(
name = "maven_gvm",
group = "org.junit.platform",
artifact = "junit-platform-launcher",
version = JUNIT5_PLATFORM_VERSION,
)

STD_ARTIFACTS = [
# Nothing at this time.
]

MAVEN_REPOSITORIES = [
Expand All @@ -149,16 +248,11 @@ MAVEN_REPOSITORIES = [
"https://repo1.maven.org/maven2",
]

maven = use_extension(
"@rules_jvm_external//:extensions.bzl",
"maven",
dev_dependency = True,
)
maven.install(
name = "maven_gvm",
artifacts = MAVEN_ARTIFACTS,
lock_file = "//:maven_install.json",
repositories = MAVEN_REPOSITORIES,
lock_file = "//:maven_install.json",
artifacts = STD_ARTIFACTS,
)
use_repo(
maven,
Expand Down
Loading