gozig

command module
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gozig

The tool reads GOOS and GOARCH env vars and passes the corresponding target arguments to zig cc and zig c++ invocations.

To make it work with go build you need to set the following env vars:

  • CC=gozig cc
  • CXX=gozig c++

Original idea and implementation is from zigtool

This tool is used in go-build-everywhere toolset.

Targets support

linux, windows, darwin and wasm targets are supported.

Platform-specific flags

To add MacOS SDK path use GOZIG_OSX_SDK env variable (will be used for darwin builds).

Installation

go install github.com/cardinalby/gozig@latest
Debug invocations

Set DEBUG_EXEC=1 env variable to see the actual zig cc and zig c++ invocation arguments in the output.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
zig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址