aboutsummaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2020-03-03 14:50:13 +0100
committerRon Evans <[email protected]>2020-04-09 20:23:51 +0200
commit0afd42c439323b12faeac62fd75c3ec8d7db9e6e (patch)
treed683db6807aa416096b1e94e05aecdc2ccd6aae7 /loader
parent584e94ce2f55e6fe39ee68189629575b8e47591d (diff)
downloadtinygo-0afd42c439323b12faeac62fd75c3ec8d7db9e6e.tar.gz
tinygo-0afd42c439323b12faeac62fd75c3ec8d7db9e6e.zip
main: switch to LLVM 10
This commit also adds a bit of version independence, in particular for external commands. It also adds the LLVM version to the `tinygo version` command, which might help while debugging.
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/loader.go b/loader/loader.go
index 8c13cb813..5682bfa4a 100644
--- a/loader/loader.go
+++ b/loader/loader.go
@@ -423,7 +423,7 @@ func (p *Package) parseFiles(includeTests bool) ([]*ast.File, error) {
if len(p.CgoFiles) != 0 {
cflags := append(p.CFlags, "-I"+p.Package.Dir)
if p.ClangHeaders != "" {
- cflags = append(cflags, "-I"+p.ClangHeaders)
+ cflags = append(cflags, "-Xclang", "-internal-isystem", "-Xclang", p.ClangHeaders)
}
generated, errs := cgo.Process(files, p.Program.Dir, p.fset, cflags)
if errs != nil {