github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/go/internal/gccgoimporter/gccgoinstallation.go (about) 1 // Copyright 2013 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 gccgoimporter 6 7 import ( 8 "github.com/shogo82148/std/go/types" 9 ) 10 11 // Information about a specific installation of gccgo. 12 type GccgoInstallation struct { 13 // Version of gcc (e.g. 4.8.0). 14 GccVersion string 15 16 // Target triple (e.g. x86_64-unknown-linux-gnu). 17 TargetTriple string 18 19 // Built-in library paths used by this installation. 20 LibPaths []string 21 } 22 23 // Ask the driver at the given path for information for this GccgoInstallation. 24 // The given arguments are passed directly to the call of the driver. 25 func (inst *GccgoInstallation) InitFromDriver(gccgoPath string, args ...string) (err error) 26 27 // Return the list of export search paths for this GccgoInstallation. 28 func (inst *GccgoInstallation) SearchPaths() (paths []string) 29 30 // Return an importer that searches incpaths followed by the gcc installation's 31 // built-in search paths and the current directory. 32 func (inst *GccgoInstallation) GetImporter(incpaths []string, initmap map[*types.Package]InitData) Importer