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: 0

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