diff --git a/.travis.yml b/.travis.yml index 83fdd897fb..ffce7f20aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,14 @@ matrix: use_allocator="none" use_allocator_shim=false 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' + - 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" os: osx osx_image: xcode10.2 diff --git a/src/build/toolchain/linux/BUILD.gn b/src/build/toolchain/linux/BUILD.gn index 75376f5f49..a73b279c1a 100644 --- a/src/build/toolchain/linux/BUILD.gn +++ b/src/build/toolchain/linux/BUILD.gn @@ -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") { toolprefix = "aarch64-linux-gnu-" diff --git a/src/get-openwrt.sh b/src/get-openwrt.sh index 0ce461c018..4378e7bc38 100755 --- a/src/get-openwrt.sh +++ b/src/get-openwrt.sh @@ -23,8 +23,8 @@ for flag in ALL_NONSHARED ALL_KMODS ALL SIGNED_PACKAGES; do done make oldconfig make -full_root=staging_dir/toolchain-${arch}_gcc-${gcc_ver}_musl -cp -r staging_dir/target-${arch}_musl/usr $full_root +full_root=staging_dir/toolchain-*_gcc-${gcc_ver}_musl +cp -r staging_dir/target-*_musl/usr $full_root echo ' ./include ./lib/*.o