github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/link/internal/ld/config.go (about) 1 // Copyright 2016 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 ld 6 7 // A BuildMode indicates the sort of object we are building. 8 // 9 // Possible build modes are the same as those for the -buildmode flag 10 // in cmd/go, and are documented in 'go help buildmode'. 11 type BuildMode uint8 12 13 const ( 14 BuildModeUnset BuildMode = iota 15 BuildModeExe 16 BuildModePIE 17 BuildModeCArchive 18 BuildModeCShared 19 BuildModeShared 20 BuildModePlugin 21 ) 22 23 // Set implements flag.Value to set the build mode based on the argument 24 // to the -buildmode flag. 25 func (mode *BuildMode) Set(s string) error 26 27 func (mode BuildMode) String() string 28 29 // LinkMode indicates whether an external linker is used for the final link. 30 type LinkMode uint8 31 32 const ( 33 LinkAuto LinkMode = iota 34 LinkInternal 35 LinkExternal 36 ) 37 38 func (mode *LinkMode) Set(s string) error 39 40 func (mode *LinkMode) String() string