cgo: support builtin #include headers

Add support for header files bundled with the compiler by copying them
into the release tarball.
This commit is contained in:
Ayke van Laethem
2019-04-20 15:14:48 +02:00
committed by Ron Evans
parent d396abb690
commit 2f2d62cc0c
10 changed files with 49 additions and 18 deletions
+3 -2
View File
@@ -217,8 +217,9 @@ func (c *Compiler) Compile(mainPath string) error {
MaxAlign: int64(c.targetData.PrefTypeAlignment(c.i8ptrType)),
},
},
Dir: wd,
CFlags: c.CFlags,
Dir: wd,
TinyGoRoot: c.RootDir,
CFlags: c.CFlags,
}
if strings.HasSuffix(mainPath, ".go") {
_, err = lprogram.ImportFile(mainPath)