Skip to content

[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
wants to merge 24 commits into from
Closed

[WIP] Support Zig 0.12 #255

wants to merge 24 commits into from

Conversation

aherrmann
Copy link
Owner

  • 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

aherrmann added 24 commits April 7, 2024 13:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant