arm: use the lld linker
LLD version 8 has added support for armv6m: https://reviews.llvm.org/D55555 This means we can use LLD instead of arm-none-eabi-ld, eliminating our dependency on GNU binutils. There are small differences in code size, but never more than a few bytes.
Этот коммит содержится в:
родитель
31d57fd3d1
коммит
2523772b5d
6 изменённых файлов: 5 добавлений и 7 удалений
|
@ -24,7 +24,6 @@ commands:
|
||||||
libclang<<parameters.llvm>>-dev \
|
libclang<<parameters.llvm>>-dev \
|
||||||
lld<<parameters.llvm>> \
|
lld<<parameters.llvm>> \
|
||||||
gcc-arm-linux-gnueabihf \
|
gcc-arm-linux-gnueabihf \
|
||||||
binutils-arm-none-eabi \
|
|
||||||
libc6-dev-armel-cross \
|
libc6-dev-armel-cross \
|
||||||
gcc-aarch64-linux-gnu \
|
gcc-aarch64-linux-gnu \
|
||||||
libc6-dev-arm64-cross \
|
libc6-dev-arm64-cross \
|
||||||
|
|
|
@ -11,11 +11,9 @@ matrix:
|
||||||
addons:
|
addons:
|
||||||
homebrew:
|
homebrew:
|
||||||
update: true
|
update: true
|
||||||
taps: ArmMbed/homebrew-formulae
|
|
||||||
packages:
|
packages:
|
||||||
- llvm@8
|
- llvm@8
|
||||||
- qemu
|
- qemu
|
||||||
- arm-none-eabi-gcc
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||||
|
|
|
@ -59,7 +59,7 @@ COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/lib /go/src/github.
|
||||||
|
|
||||||
RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
|
RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y apt-utils python3 make binutils-arm-none-eabi clang-8 && \
|
apt-get install -y apt-utils python3 make clang-8 && \
|
||||||
make gen-device-nrf && make gen-device-stm32 && \
|
make gen-device-nrf && make gen-device-stm32 && \
|
||||||
apt-get remove -y python3 make && \
|
apt-get remove -y python3 make && \
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
|
@ -74,7 +74,7 @@ COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/lib /go/src/github.
|
||||||
|
|
||||||
RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
|
RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y apt-utils python3 make binutils-arm-none-eabi clang-8 binutils-avr gcc-avr avr-libc && \
|
apt-get install -y apt-utils python3 make clang-8 binutils-avr gcc-avr avr-libc && \
|
||||||
make gen-device && \
|
make gen-device && \
|
||||||
apt-get remove -y python3 make && \
|
apt-get remove -y python3 make && \
|
||||||
apt-get autoremove -y && \
|
apt-get autoremove -y && \
|
||||||
|
|
|
@ -6,6 +6,6 @@ package main
|
||||||
var commands = map[string]string{
|
var commands = map[string]string{
|
||||||
"ar": "llvm-ar",
|
"ar": "llvm-ar",
|
||||||
"clang": "clang-8",
|
"clang": "clang-8",
|
||||||
"ld.lld": "ld.lld-8",
|
"ld.lld": "ld.lld",
|
||||||
"wasm-ld": "wasm-ld",
|
"wasm-ld": "wasm-ld",
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ SECTIONS
|
||||||
|
|
||||||
/DISCARD/ :
|
/DISCARD/ :
|
||||||
{
|
{
|
||||||
|
*(.ARM.exidx) /* causes 'no memory region specified' error in lld */
|
||||||
*(.ARM.exidx.*) /* causes spurious 'undefined reference' errors */
|
*(.ARM.exidx.*) /* causes spurious 'undefined reference' errors */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"goarch": "arm",
|
"goarch": "arm",
|
||||||
"compiler": "clang-8",
|
"compiler": "clang-8",
|
||||||
"gc": "marksweep",
|
"gc": "marksweep",
|
||||||
"linker": "arm-none-eabi-ld",
|
"linker": "ld.lld",
|
||||||
"rtlib": "compiler-rt",
|
"rtlib": "compiler-rt",
|
||||||
"cflags": [
|
"cflags": [
|
||||||
"-Oz",
|
"-Oz",
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче