tinygo/compiler
Ayke van Laethem 35015a7918 loader: merge roots from both Go and TinyGo in a cached directory
This commit changes the way that packages are looked up. Instead of
working around the loader package by modifying the GOROOT variable for
specific packages, create a new GOROOT using symlinks. This GOROOT is
cached for the specified configuration (Go version, underlying GOROOT
path, TinyGo path, whether to override the syscall package).

This will also enable go module support in the future.

Windows is a bit harder to support, because it only allows the creation
of symlinks when developer mode is enabled. This is worked around by
using symlinks and if that fails, using directory junctions or hardlinks
instead. This should work in the vast majority of cases. The only case
it doesn't work, is if developer mode is disabled and TinyGo, the Go
toolchain, and the cache directory are not all on the same filesystem.
If this is a problem, it is still possible to improve the code by using
file copies instead.

As a side effect, this also makes diagnostics use a relative file path
only when the file is not in GOROOT or in TINYGOROOT.
2020-05-27 13:08:17 +02:00
..
ircheck compiler: move IR checker to separate package 2020-03-21 15:45:25 +01:00
llvmutil compiler/llvmutil: move constant pointer packs into constant globals 2020-02-24 23:27:04 +01:00
asserts.go compiler: implement spec-compliant shifts 2020-03-28 17:35:19 +01:00
calls.go compiler: add parameter names to IR 2020-04-21 08:54:39 +02:00
channel.go compiler: refactor creating of channel operations 2020-03-25 20:17:46 +01:00
compiler.go loader: merge roots from both Go and TinyGo in a cached directory 2020-05-27 13:08:17 +02:00
defer.go compiler: pass interface typecode through defer frames 2020-04-09 15:02:09 +02:00
errors.go compiler: rename Compiler.getValue -> builder.getValue 2020-03-25 20:17:46 +01:00
func.go compiler: add parameter names to IR 2020-04-21 08:54:39 +02:00
gc.go compiler: track the result of string concatenation 2020-04-02 14:04:25 +02:00
goroutine.go compiler: add debug info to goroutine start wrappers 2020-04-03 08:12:18 +02:00
inlineasm.go all: replace ReadRegister with AsmFull inline assembly 2020-04-29 18:25:16 +02:00
interface.go compiler: add parameter names to IR 2020-04-21 08:54:39 +02:00
interrupt.go compiler: refactor function calling 2020-03-25 20:17:46 +01:00
intrinsics.go compiler,runtime: translate memzero calls to LLVM memset intrinsics 2020-03-27 21:01:59 +01:00
llvm.go compiler/llvm.go: fix typo 2020-04-13 16:07:35 +02:00
map.go compiler: refactor map operations to use the builder object 2020-03-25 20:17:46 +01:00
sizes.go compiler: unexport some exported symbols 2020-04-13 09:24:57 +02:00
symbol.go compiler: refactor public interface 2020-03-25 20:17:46 +01:00
syscall.go compiler: refactor function calling 2020-03-25 20:17:46 +01:00
volatile.go compiler: do not perform nil checking when indexing slices 2020-03-27 07:38:16 +01:00