From 2c3cafb500c8a54c1260f910a738ec24f8dad055 Mon Sep 17 00:00:00 2001 From: CN_SZTL <22235437+1715173329@users.noreply.github.com> Date: Thu, 1 Oct 2020 08:42:11 +0800 Subject: [PATCH] build: Add mips64el & i386 OpenWrt toolchain definitions OpenWrt has arch mips64el and i386, add here to support them. Signed-off-by: CN_SZTL --- src/build/toolchain/linux/BUILD.gn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/build/toolchain/linux/BUILD.gn b/src/build/toolchain/linux/BUILD.gn index d9f0c57a57..f3140ea32e 100644 --- a/src/build/toolchain/linux/BUILD.gn +++ b/src/build/toolchain/linux/BUILD.gn @@ -96,6 +96,18 @@ clang_toolchain("clang_x86") { } } +clang_toolchain("clang_x86_openwrt") { + # Output linker map files for binary size analysis. + enable_linker_map = true + extra_cppflags = "--target=i486-openwrt-linux-musl -D_LIBCPP_HAS_MUSL_LIBC -D__UCLIBC__" + extra_ldflags = "--target=i486-openwrt-linux-musl -Wl,--dynamic-linker=/lib/ld-musl-i386.so.1" + + toolchain_args = { + current_cpu = "x86" + current_os = "linux" + } +} + clang_toolchain("clang_x86_v8_arm") { toolchain_args = { current_cpu = "x86" @@ -245,6 +257,16 @@ clang_toolchain("clang_mips64el") { } } +clang_toolchain("clang_mips64el_openwrt") { + extra_cppflags = "--target=mips64el-openwrt-linux-musl -D_LIBCPP_HAS_MUSL_LIBC -D__UCLIBC__" + extra_ldflags = "--target=mips64el-openwrt-linux-musl" + + toolchain_args = { + current_cpu = "mips64el" + current_os = "linux" + } +} + gcc_toolchain("mipsel") { toolprefix = "mipsel-linux-gnu-"