aboutsummaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-12-09 02:52:08 +0100
committerRon Evans <[email protected]>2022-01-09 11:04:10 +0100
commitebd4969cde351cdc31eb142f14dd4c1ce1352de1 (patch)
tree1e15d66126a03d1d5183b6d94f03c0b5608c9913 /loader
parent32a7b8cc4e78799c6447064b9f5576c7f16c4f88 (diff)
downloadtinygo-ebd4969cde351cdc31eb142f14dd4c1ce1352de1.tar.gz
tinygo-ebd4969cde351cdc31eb142f14dd4c1ce1352de1.zip
all: switch to LLVM 13
This adds support for building with `-tags=llvm13` and switches to LLVM 13 for tinygo binaries that are statically linked against LLVM. Some notes on this commit: * Added `-mfloat-abi=soft` to all Cortex-M targets because otherwise nrfx would complain that floating point was enabled on Cortex-M0. That's not the case, but with `-mfloat-abi=soft` the `__SOFTFP__` macro is defined which silences this warning. See: https://reviews.llvm.org/D100372 * Changed from `--sysroot=<root>` to `-nostdlib -isystem <root>` for musl because with Clang 13, even with `--sysroot` some system libraries are used which we don't want. * Changed all `-Xclang -internal-isystem -Xclang` to simply `-isystem`, for consistency with the above change. It appears to have the same effect. * Moved WebAssembly function declarations to the top of the file in task_asyncify_wasm.S because (apparently) the assembler has become more strict.
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 1f43e07e4..489ed24f0 100644
--- a/loader/loader.go
+++ b/loader/loader.go
@@ -406,7 +406,7 @@ func (p *Package) parseFiles() ([]*ast.File, error) {
initialCFlags = append(initialCFlags, p.program.config.CFlags()...)
initialCFlags = append(initialCFlags, "-I"+p.Dir)
if p.program.clangHeaders != "" {
- initialCFlags = append(initialCFlags, "-Xclang", "-internal-isystem", "-Xclang", p.program.clangHeaders)
+ initialCFlags = append(initialCFlags, "-isystem", p.program.clangHeaders)
}
generated, headerCode, cflags, ldflags, accessedFiles, errs := cgo.Process(files, p.program.workingDir, p.program.fset, initialCFlags)
p.CFlags = append(initialCFlags, cflags...)