Browse Source

Revert "all: use compiler-rt from the llvm-project directory"

This reverts commit acdaaa17d8.
See https://github.com/tinygo-org/tinygo/issues/734 for details.
pull/754/head
Ayke van Laethem 5 years ago
committed by Ron Evans
parent
commit
4be80e0372
  1. 4
      .gitmodules
  2. 18
      Makefile
  3. 6
      builder/builtins.go
  4. 1
      lib/compiler-rt

4
.gitmodules

@ -10,3 +10,7 @@
[submodule "lib/cmsis-svd"]
path = lib/cmsis-svd
url = https://github.com/tinygo-org/cmsis-svd
[submodule "lib/compiler-rt"]
path = lib/compiler-rt
url = https://github.com/llvm-mirror/compiler-rt.git
branch = release_80

18
Makefile

@ -258,16 +258,16 @@ release: tinygo gen-device
@mkdir -p build/release/tinygo/pkg/armv7m-none-eabi
@mkdir -p build/release/tinygo/pkg/armv7em-none-eabi
@echo copying source files
@cp -p build/tinygo$(EXE) build/release/tinygo/bin
@cp -p build/tinygo$(EXE) build/release/tinygo/bin
@cp -p $(abspath $(CLANG_SRC))/lib/Headers/*.h build/release/tinygo/lib/clang/include
@cp -rp lib/CMSIS/CMSIS/Include build/release/tinygo/lib/CMSIS/CMSIS
@cp -rp lib/CMSIS/README.md build/release/tinygo/lib/CMSIS
@cp -rp llvm-project/compiler-rt/lib/builtins build/release/tinygo/lib/compiler-rt/lib
@cp -rp llvm-project/compiler-rt/LICENSE.TXT build/release/tinygo/lib/compiler-rt
@cp -rp llvm-project/compiler-rt/README.txt build/release/tinygo/lib/compiler-rt
@cp -rp lib/nrfx/* build/release/tinygo/lib/nrfx
@cp -rp src build/release/tinygo/src
@cp -rp targets build/release/tinygo/targets
@cp -rp lib/CMSIS/CMSIS/Include build/release/tinygo/lib/CMSIS/CMSIS
@cp -rp lib/CMSIS/README.md build/release/tinygo/lib/CMSIS
@cp -rp lib/compiler-rt/lib/builtins build/release/tinygo/lib/compiler-rt/lib
@cp -rp lib/compiler-rt/LICENSE.TXT build/release/tinygo/lib/compiler-rt
@cp -rp lib/compiler-rt/README.txt build/release/tinygo/lib/compiler-rt
@cp -rp lib/nrfx/* build/release/tinygo/lib/nrfx
@cp -rp src build/release/tinygo/src
@cp -rp targets build/release/tinygo/targets
./build/tinygo build-builtins -target=armv6m-none-eabi -o build/release/tinygo/pkg/armv6m-none-eabi/compiler-rt.a
./build/tinygo build-builtins -target=armv7m-none-eabi -o build/release/tinygo/pkg/armv7m-none-eabi/compiler-rt.a
./build/tinygo build-builtins -target=armv7em-none-eabi -o build/release/tinygo/pkg/armv7em-none-eabi/compiler-rt.a

6
builder/builtins.go

@ -166,12 +166,6 @@ func builtinFiles(target string) []string {
// builtinsDir returns the directory where the sources for compiler-rt are kept.
func builtinsDir() string {
// Path from within the development directory.
path := filepath.Join(goenv.Get("TINYGOROOT"), "llvm-project", "compiler-rt", "lib", "builtins")
if _, err := os.Stat(path); err == nil {
return path
}
// Path from within an installation directory (bundled in the release tarball).
return filepath.Join(goenv.Get("TINYGOROOT"), "lib", "compiler-rt", "lib", "builtins")
}

1
lib/compiler-rt

@ -0,0 +1 @@
Subproject commit 5bc79797e1f9184f39e1bd30fac75d995b72cea3
Loading…
Cancel
Save