Add OpenWrt arm64 build

This commit is contained in:
klzgrad 2020-03-07 14:25:26 +08:00
parent e571fc95be
commit 0b3ef999a8
3 changed files with 20 additions and 2 deletions

View File

@ -39,6 +39,14 @@ matrix:
use_allocator="none" use_allocator_shim=false use_allocator="none" use_allocator_shim=false
custom_toolchain="//build/toolchain/linux:clang_x64_openwrt"' custom_toolchain="//build/toolchain/linux:clang_x64_openwrt"'
OPENWRT_FLAGS='arch=x86_64 release=19.07.1 gcc_ver=7.5.0 target=x86 subtarget=64' OPENWRT_FLAGS='arch=x86_64 release=19.07.1 gcc_ver=7.5.0 target=x86 subtarget=64'
- name: "openwrt-arm64"
os: linux
dist: bionic
env: EXTRA_FLAGS='
target_cpu="arm64"
use_allocator="none" use_allocator_shim=false
custom_toolchain="//build/toolchain/linux:clang_arm64_openwrt"'
OPENWRT_FLAGS='arch=aarch64 release=19.07.1 gcc_ver=7.5.0 target=armvirt subtarget=64'
- name: "osx" - name: "osx"
os: osx os: osx
osx_image: xcode10.2 osx_image: xcode10.2

View File

@ -29,6 +29,16 @@ clang_toolchain("clang_arm64") {
} }
} }
clang_toolchain("clang_arm64_openwrt") {
extra_cppflags = "--target=aarch64-openwrt-linux-musl -D_LIBCPP_HAS_MUSL_LIBC -D__UCLIBC__"
extra_ldflags = "--target=aarch64-openwrt-linux-musl"
toolprefix = "aarch64-linux-gnu-"
toolchain_args = {
current_cpu = "arm64"
current_os = "linux"
}
}
gcc_toolchain("arm64") { gcc_toolchain("arm64") {
toolprefix = "aarch64-linux-gnu-" toolprefix = "aarch64-linux-gnu-"

View File

@ -23,8 +23,8 @@ for flag in ALL_NONSHARED ALL_KMODS ALL SIGNED_PACKAGES; do
done done
make oldconfig make oldconfig
make make
full_root=staging_dir/toolchain-${arch}_gcc-${gcc_ver}_musl full_root=staging_dir/toolchain-*_gcc-${gcc_ver}_musl
cp -r staging_dir/target-${arch}_musl/usr $full_root cp -r staging_dir/target-*_musl/usr $full_root
echo ' echo '
./include ./include
./lib/*.o ./lib/*.o