build: Add OpenWrt toolchain definitions

This commit is contained in:
klzgrad 2020-02-06 03:07:31 +08:00
parent 44a71ac4aa
commit 349b4e4531

View File

@ -128,6 +128,18 @@ clang_toolchain("clang_x64") {
}
}
clang_toolchain("clang_x64_openwrt") {
# Output linker map files for binary size analysis.
enable_linker_map = true
extra_cppflags = "--target=x86_64-openwrt-linux-musl -D_LIBCPP_HAS_MUSL_LIBC -D__UCLIBC__"
extra_ldflags = "--target=x86_64-openwrt-linux-musl"
toolchain_args = {
current_cpu = "x64"
current_os = "linux"
}
}
clang_toolchain("clang_x64_v8_arm64") {
toolchain_args = {
current_cpu = "x64"
@ -178,6 +190,16 @@ clang_toolchain("clang_mipsel") {
}
}
clang_toolchain("clang_mipsel_openwrt") {
extra_cppflags = "--target=mipsel-openwrt-linux-musl -D_LIBCPP_HAS_MUSL_LIBC -D__UCLIBC__"
extra_ldflags = "--target=mipsel-openwrt-linux-musl"
toolchain_args = {
current_cpu = "mipsel"
current_os = "linux"
}
}
clang_toolchain("clang_mips64el") {
toolchain_args = {
current_cpu = "mips64el"