mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
all: try more locations to find Clang built-in headers
This commit fixes the case where TinyGo was built with `go build` and LLVM sources were never downloaded into the TinyGo source directory.
This commit is contained in:
committed by
Ron Evans
parent
3e1c0d90c5
commit
a3d1f1a514
@@ -41,6 +41,7 @@ type Config struct {
|
||||
PanicStrategy string // panic strategy ("abort" or "trap")
|
||||
CFlags []string // cflags to pass to cgo
|
||||
LDFlags []string // ldflags to pass to cgo
|
||||
ClangHeaders string // Clang built-in header include path
|
||||
DumpSSA bool // dump Go SSA, for compiler debugging
|
||||
Debug bool // add debug symbols for gdb
|
||||
GOROOT string // GOROOT
|
||||
@@ -235,9 +236,10 @@ func (c *Compiler) Compile(mainPath string) []error {
|
||||
MaxAlign: int64(c.targetData.PrefTypeAlignment(c.i8ptrType)),
|
||||
},
|
||||
},
|
||||
Dir: wd,
|
||||
TINYGOROOT: c.TINYGOROOT,
|
||||
CFlags: c.CFlags,
|
||||
Dir: wd,
|
||||
TINYGOROOT: c.TINYGOROOT,
|
||||
CFlags: c.CFlags,
|
||||
ClangHeaders: c.ClangHeaders,
|
||||
}
|
||||
if strings.HasSuffix(mainPath, ".go") {
|
||||
_, err = lprogram.ImportFile(mainPath)
|
||||
|
||||
Reference in New Issue
Block a user