Граф коммитов

34 коммитов

Автор SHA1 Сообщение Дата
Elliott Sales de Andrade
b7f4373681 Fix parsing of beta Go versions. 2019-08-05 17:45:45 +02:00
diamondburned
aabb6ba22b
main: use zversion.go and VERSION files to detect version, fixes #433 2019-07-06 02:31:49 +02:00
m-chichikalov
84618c45eb Added supporting suctom TargetSpec json file via -target flag. 2019-06-20 19:10:15 +02:00
Ayke van Laethem
a3d1f1a514 all: try more locations to find Clang built-in headers
This commit fixes the case where TinyGo was built with `go build` and
LLVM sources were never downloaded into the TinyGo source directory.
2019-06-13 15:21:04 +02:00
Ayke van Laethem
776dc1e0d9 main: show a better error when version detection of GOROOT failed 2019-06-06 13:59:37 +02:00
j7b
0ae467d3e2
llvm cpu features 2019-05-28 15:41:34 +02:00
Ayke van Laethem
7e6a54ac62 main: add build tags for the Go stdlib version 2019-05-24 14:51:40 +02:00
Ayke van Laethem
141a70f401 main: make $GOROOT more robust and configurable
Check various locations that $GOROOT may live, including the location of
the go binary. But make it possible to override this autodetection by
setting GOROOT manually as an environment variable.
2019-05-07 09:14:43 +02:00
Ayke van Laethem
9cad8bd0c8 main: add fallback mechanism for LLVM commands
On Debian, all LLVM commands have a version suffix (clang-8, ld.lld-8,
wasm-ld-8, etc.). However. Most other distributions only provide a
version prefix for Clang and not for all the other commands.

This commit fixes the issue by trying the command with the version
suffix first and falling back to one without if needed.
2019-05-05 17:00:33 +02:00
Ayke van Laethem
4f932b6e66 all: use internal objcopy implementation
This lessens the dependency on binutils (e.g. arm-none-eabi-objcopy).
2019-03-04 21:17:56 +01:00
Ayke van Laethem
9b4071237f arm: switch to hardfloat ABI for Linux
This avoids an error on the Raspberry Pi 3.
2019-03-01 20:36:12 +01:00
Ayke van Laethem
0b212cf2f6 all: add macOS support 2019-02-19 15:54:36 +01:00
Ayke van Laethem
3cba36f2ba compiler: add syscalls for 64-bit arm 2019-02-07 07:00:37 +01:00
Ayke van Laethem
93d5269fef compiler: add syscalls for 32-bit arm 2019-02-07 07:00:37 +01:00
Ayke van Laethem
0757eb5919 main: link with --gc-sections
This may help reduce code size in some cases.
2019-02-05 19:37:21 +01:00
Ayke van Laethem
e7ad366f20
target: detect source directory more reliably
Use the binary path as a first guess.
2019-02-01 13:26:32 +01:00
Ayke
107fccb288 all: add support for more architectures and GOOS/GOARCH (#118)
This commit does two things:

  * It adds support for the GOOS and GOARCH environment variables. They
    fall back to runtime.GO* only when not available.
  * It adds support for 3 new architectures: 386, arm, and arm64. For
    now, this is Linux-only.
2019-01-05 11:46:25 +01:00
Ayke
873c1c3b4d Reduce code size for AVR (#116)
* all: add support for specifying target CPU in target config
* avr: specify the chip name in the target CPU

This reduces code size by a large margin. For examples/blinky, it
reduces code size from 1360 to 1266 when compiling for the Arduino Uno
(94 bytes, or ~7%).
2019-01-04 14:58:35 +01:00
Ayke van Laethem
ecf6ffa62e
all: add bare-bones Cgo support 2018-12-10 15:38:02 +01:00
Ayke van Laethem
e817bd38ec
main: configure default GC in target JSON file 2018-11-28 17:34:57 +01:00
Ayke van Laethem
62d74d8329
all: compile and link using clang, where possible 2018-11-22 16:20:10 +01:00
Ayke van Laethem
760bc5d0a4
targets: let specific targets inherit more general targets
This avoids a ton of duplication and makes it easier to change a generic
target (for example, the "cortex-m" target) for all boards that use it.

Also, by making it possible to inherit properties from a parent target
specification, it is easier to support out-of-tree boards that don't
have to be updated so often. A target specification for a
special-purpose board can simply inherit the specification of a
supported chip and override the properites it needs to override (like
the programming interface).
2018-11-19 21:08:12 +01:00
Ayke van Laethem
f02766265c
targets: make compiler runtime selection more configurable 2018-11-19 20:17:42 +01:00
Ayke van Laethem
e5e09747f0
all: add WebAssembly backend 2018-10-21 19:47:47 +02:00
Ayke van Laethem
a63af97e86
all: add emulation support for Cortex-M3 with QEMU 2018-10-08 17:07:19 +02:00
Ayke van Laethem
22da104530
all: use compiler-rt for builtins 2018-10-07 19:04:29 +02:00
Ayke van Laethem
b08c8a0cf0
all: implement gdb sub-command for easy debugging 2018-10-03 19:03:22 +02:00
Ayke van Laethem
b6db84e916
main: use GOPATH from the environment
Be more compatible with the Go toolchain by setting GOPATH in the same
way. This makes it possible to flash and run examples from the standard
GOPATH instead of only from the source tree.
2018-09-29 22:30:45 +02:00
Ayke van Laethem
fd6dda5e4f
main: run the compiler from any path 2018-09-24 12:25:33 +02:00
Ayke van Laethem
2496ae9967
compiler: emit non-PIE executables
This fixes a problem on baremetal targets, where PIE doesn't make any
sense. Specifically, on ARM, the compiler sometimes inserted GOT
pointers for linker-defined globals.
2018-09-21 14:37:11 +02:00
Ayke van Laethem
112f6dc01a
all: implement tinygo flash command
This will now just work:

    tinygo flash -target=arduino examples/blinky1
2018-09-14 20:59:28 +02:00
Ayke van Laethem
c763e9f1a6
compiler: produce .hex files directly 2018-09-14 20:27:04 +02:00
Ayke van Laethem
914cd56ca5
all: support Arduino in the compiler driver
This makes sure the compiler itself can build/link an ELF file that
works on an Arduino.
2018-09-12 20:55:50 +02:00
Ayke van Laethem
9bec479041
all: make targets configurable with a JSON file
This is intentionally similar to the target specifications in Rust:
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.TargetOptions.html
2018-09-12 18:28:39 +02:00