generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 5
[WIP] Support Zig 0.12 #255
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
aherrmann
commented
Apr 7, 2024
- Include Zig HEAD version
- update_zig_version: track latest release version
- pin tests to LATEST_RELEASE
- Update to Zig SDK version 0.12.0-dev
- TMP e2e with 0.12.0
- --main-pkg-path was removed in 0.12
- fix-v-check
- pass Zig version to zig_module_dependencies
- Use -M flags for Zig 0.12
- --deps flags before --mod flags
- Re-order Zig compiler flags
- Separate module dependencies from specifications
- Test zig_module_dependencies/specifications separately
- Render --dep instead of --deps for Zig 0.12
- Use -M flag for main module with Zig 0.12
- Declare --dep before main module -M
- Assign main module name for Zig 0.12
- var --> const for Zig 0.12
- update error union for Zig 0.12
- ChildProcess.exec --> .run for Zig 0.12
- Coff.init is_loaded argument for Zig 0.12
- Order settings and platform flags for Zig 0.12
- Specify target before the main module
- Zig 0.12 GlobalLinkage .Strong --> .strong
This is required by Zig 0.12. Additionally Zig 0.12 will require a -M flag for the main module.
Zig SDK 0.12 places stricter meaning on the order of command-line flags: The first module to be declared is considered the main module. Module specific options, such as configuration or target settings have to be listed before the module that they affect.
This ordering is requried for Zig 0.12
This is requried to avoid errors of the form ``` INFO: From Building zig-docs/main.zig as Zig shared library bazel-out/k8-fastbuild/bin/zig-docs/libshared-library.so: invalid filename !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "zig 0.12.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !229, splitDebugInlining: false) !3 = !DIFile(filename: "", directory: "/home/aj/.cache/bazel/_bazel_aj/0deefcb713c28fbc7261691ef6069b08/sandbox/linux-sandbox/200/execroot/_main/zig-docs") warning: ignoring invalid debug info in BitcodeBuffer ```
Configuration that is meant to be global, not just per module, needs to be set at the end of the command line.
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.