From b47343f9b5d65adf69fd531cfe29bdc8b8c83a0b Mon Sep 17 00:00:00 2001 From: klzgrad Date: Tue, 19 May 2020 23:43:20 +0800 Subject: [PATCH] build: Add openwrt ARM build --- src/build/toolchain/linux/BUILD.gn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/build/toolchain/linux/BUILD.gn b/src/build/toolchain/linux/BUILD.gn index a73b279c1a..2e7913a4fa 100644 --- a/src/build/toolchain/linux/BUILD.gn +++ b/src/build/toolchain/linux/BUILD.gn @@ -21,6 +21,16 @@ clang_toolchain("clang_arm") { } } +clang_toolchain("clang_arm_openwrt") { + extra_cppflags = "--target=arm-openwrt-linux-muslgnueabi -D_LIBCPP_HAS_MUSL_LIBC -D__UCLIBC__" + extra_ldflags = "--target=arm-openwrt-linux-muslgnueabi" + extra_asmflags = "--target=arm-openwrt-linux-muslgnueabi" + toolchain_args = { + current_cpu = "arm" + current_os = "linux" + } +} + clang_toolchain("clang_arm64") { toolprefix = "aarch64-linux-gnu-" toolchain_args = { @@ -32,7 +42,7 @@ 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-" + extra_asmflags = "--target=aarch64-openwrt-linux-musl" toolchain_args = { current_cpu = "arm64" current_os = "linux"