tinygo/builder
Ayke van Laethem 9342e73ae1 builder: fix picolibc include path
Previously we used --sysroot to set the sysroot explicitly.
Unfortunately, this flag is not used directly by Clang to set the
include path (<sysroot>/include) but is instead interpreted by the
toolchain code. This means that even when the toolchain is explicitly
set (using the --sysroot parameter), it may still decide to use a
different include path such as <sysroot>/usr/include (such as on
baremetal aarch64).

This commit uses the Clang-internal -internal-isystem flag which sets
the include directory directly (as a system include path). This should
be more robust.

The reason the --sysroot parameter has so far worked is that all
existing targets happened to add <sysroot>/include as an include path.

The relevant Clang code is here:
https://github.com/llvm/llvm-project/blob/release/9.x/clang/lib/Driver/Driver.cpp#L4693-L4739
So far, RISC-V is handled by RISCVToolchain, Cortex-M targets by
BareMetal (which seems to be specific to ARM unlike what the name says)
and aarch64 fell back to Generic_ELF.
2020-04-29 15:41:08 +02:00
..
ar.go builder: write a symbol table when writing out the compiler-rt lib 2019-11-13 13:52:20 +01:00
build.go compiler: refactor public interface 2020-03-25 20:17:46 +01:00
buildcache.go main: refactor compile/link part to a builder package 2019-11-11 20:53:50 +01:00
builtins.go builder: make sure -fshort-enums is used consistently 2020-04-07 16:17:10 +02:00
cc1as.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
cc1as.h main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
clang.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
commands.go main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
config.go all: support Go 1.14 2020-04-12 18:41:34 +02:00
env.go builder: update Clang header location 2019-12-24 08:59:33 +01:00
error.go compiler: add location information to the IR checker 2019-12-21 20:49:51 +01:00
library.go arm: use -fomit-frame-pointer 2020-04-07 16:17:10 +02:00
lld.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
objcopy.go main: refactor compile/link part to a builder package 2019-11-11 20:53:50 +01:00
picolibc.go builder: fix picolibc include path 2020-04-29 15:41:08 +02:00
sizes.go builder: work around a bug in ld.lld in LLVM 10 2020-04-09 20:23:51 +02:00
tools-builtin.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
tools-external.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
tools.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
uf2.go targets: add target circuitplay-bluefruit 2020-01-06 09:23:39 +01:00