fix(native_image): fix C++ toolchain env setup#72
fix(native_image): fix C++ toolchain env setup#72fmeum wants to merge 3 commits intosgammon:mainfrom
Conversation
Make use of `Args` lazy string formatting to save memory. Also pass in compiler options as repeated flags, not joined on spaces, to prevent issues when compiler options contain spaces.
`depset` structures should be kept as flat as possible. C++ toolchain files are also already `depset`s and thus shouldn't be passed into `tools`.
Instead of relying on the default shell env, get the environment variables declared by the C++ toolchain. On macOS, additionally use `apple_support` to pass in `DEVELOPER_DIR`. Since GraalVM sanitizes the environment, all variables are translated into `-E` flags.
|
Kudos, SonarCloud Quality Gate passed! |
|
@keith This is what I came up with based on your diff. It works in Bazel CI :-) |
- fix: use legacy rules from legacy gvm - chore: drop `MODULE-resolved.bzl` - chore: update bzlmod lock - chore: update lib/docs deps and rebuild docs - chore: remove redundant calls in sample projects Applied on top of #72 Signed-off-by: Sam Gammon <sam@elide.ventures>
- fix: use legacy rules from legacy gvm - chore: drop `MODULE-resolved.bzl` - chore: update bzlmod lock - chore: update lib/docs deps and rebuild docs - chore: remove redundant calls in sample projects Applied on top of #72 Signed-off-by: Sam Gammon <sam@elide.ventures>
|
I can see how We could also mimic what |
|
@fmeum see #80, i've performed the rule split and refactor in anticipation of that same problem. bazel4 is fixed, mac tests are working, and that PR now includes this one as well as #73 i hope we can move discussion to #80 where we can prep a release at as such closing this (but only as long as that PR works for your needs @fmeum -- if you hit issues we can always reopen this one.) |
- fix: use legacy rules from legacy gvm - chore: drop `MODULE-resolved.bzl` - chore: update bzlmod lock - chore: update lib/docs deps and rebuild docs - chore: remove redundant calls in sample projects Applied on top of #72 Signed-off-by: Sam Gammon <sam@elide.ventures>
- fix: use legacy rules from legacy gvm - chore: drop `MODULE-resolved.bzl` - chore: update bzlmod lock - chore: update lib/docs deps and rebuild docs - chore: remove redundant calls in sample projects Applied on top of #72 Signed-off-by: Sam Gammon <sam@elide.ventures>
- fix: use legacy rules from legacy gvm - chore: drop `MODULE-resolved.bzl` - chore: update bzlmod lock - chore: update lib/docs deps and rebuild docs - chore: remove redundant calls in sample projects Applied on top of #72 Signed-off-by: Sam Gammon <sam@elide.ventures>
- fix: use legacy rules from legacy gvm - chore: drop `MODULE-resolved.bzl` - chore: update bzlmod lock - chore: update lib/docs deps and rebuild docs - chore: remove redundant calls in sample projects Applied on top of #72 Signed-off-by: Sam Gammon <sam@elide.ventures>








Instead of relying on the default shell env, get the environment
variables declared by the C++ toolchain. On macOS, additionally use
apple_supportto pass inDEVELOPER_DIR.Since GraalVM sanitizes the environment, all variables are translated
into
-Eflags.Fixes #67