...

Source file src/go/build/syslist.go

Documentation: go/build

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package build
     6  
     7  // Note that this file is read by internal/goarch/gengoarch.go and by
     8  // internal/goos/gengoos.go. If you change this file, look at those
     9  // files as well.
    10  
    11  // knownOS is the list of past, present, and future known GOOS values.
    12  // Do not remove from this list, as it is used for filename matching.
    13  // If you add an entry to this list, look at unixOS, below.
    14  var knownOS = map[string]bool{
    15  	"aix":       true,
    16  	"android":   true,
    17  	"darwin":    true,
    18  	"dragonfly": true,
    19  	"freebsd":   true,
    20  	"hurd":      true,
    21  	"illumos":   true,
    22  	"ios":       true,
    23  	"js":        true,
    24  	"linux":     true,
    25  	"nacl":      true,
    26  	"netbsd":    true,
    27  	"openbsd":   true,
    28  	"plan9":     true,
    29  	"solaris":   true,
    30  	"windows":   true,
    31  	"zos":       true,
    32  }
    33  
    34  // unixOS is the set of GOOS values matched by the "unix" build tag.
    35  // This is not used for filename matching.
    36  // This list also appears in cmd/dist/build.go and
    37  // cmd/go/internal/imports/build.go.
    38  var unixOS = map[string]bool{
    39  	"aix":       true,
    40  	"android":   true,
    41  	"darwin":    true,
    42  	"dragonfly": true,
    43  	"freebsd":   true,
    44  	"hurd":      true,
    45  	"illumos":   true,
    46  	"ios":       true,
    47  	"linux":     true,
    48  	"netbsd":    true,
    49  	"openbsd":   true,
    50  	"solaris":   true,
    51  }
    52  
    53  // knownArch is the list of past, present, and future known GOARCH values.
    54  // Do not remove from this list, as it is used for filename matching.
    55  var knownArch = map[string]bool{
    56  	"386":         true,
    57  	"amd64":       true,
    58  	"amd64p32":    true,
    59  	"arm":         true,
    60  	"armbe":       true,
    61  	"arm64":       true,
    62  	"arm64be":     true,
    63  	"loong64":     true,
    64  	"mips":        true,
    65  	"mipsle":      true,
    66  	"mips64":      true,
    67  	"mips64le":    true,
    68  	"mips64p32":   true,
    69  	"mips64p32le": true,
    70  	"ppc":         true,
    71  	"ppc64":       true,
    72  	"ppc64le":     true,
    73  	"riscv":       true,
    74  	"riscv64":     true,
    75  	"s390":        true,
    76  	"s390x":       true,
    77  	"sparc":       true,
    78  	"sparc64":     true,
    79  	"wasm":        true,
    80  }
    81  

View as plain text