-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(native_image): fix C++ toolchain env setup #72
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_support
to pass inDEVELOPER_DIR
.Since GraalVM sanitizes the environment, all variables are translated
into
-E
flags.Fixes #67