flags

package standard library
go1.27.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0 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.

Documentation

Overview

Package flags implements top-level flags and the usage message for the assembler.

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug      = flag.Bool("debug", false, "dump instructions as they are parsed")
	OutputFile = flag.String("o", "", "output file; default foo.o for /a/b/c/foo.s as first argument")
	TrimPath   = flag.String("trimpath", "", "remove prefix from recorded source file paths")
	Shared     = flag.Bool("shared", false, "generate code that can be linked into a shared library")
	Dynlink    = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
	Linkshared = flag.Bool("linkshared", false, "generate code that will be linked against Go shared libraries")
	AllErrors  = flag.Bool("e", false, "no limit on number of errors reported")
	SymABIs    = flag.Bool("gensymabis", false, "write symbol ABI information to output file, don't assemble")
	Importpath = flag.String("p", obj.UnlinkablePkg, "set expected package import to path")
	Spectre    = flag.String("spectre", "", "enable spectre mitigations in `list` (all, ret)")
	Std        = flag.Bool("std", false, "building standard library")
)
View Source
var (
	D        MultiFlag
	I        MultiFlag
	PrintOut int
	DebugV   bool
)
View Source
var DebugFlags struct {
	CompressInstructions int    `help:"use compressed instructions when possible (if supported by architecture)"`
	MayMoreStack         string `help:"call named function before all stack growth checks"`
	PCTab                string `help:"print named pc-value table\nOne of: pctospadj, pctofile, pctoline, pctoinline, pctopcdata"`
}

Functions

func Parse

func Parse()

func Usage

func Usage()

Types

type MultiFlag

type MultiFlag []string

MultiFlag allows setting a value multiple times to collect a list, as in -I=dir1 -I=dir2.

func (*MultiFlag) Set

func (m *MultiFlag) Set(val string) error

func (*MultiFlag) String

func (m *MultiFlag) String() string

Jump to

Keyboard shortcuts

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