Add prebuild support for VIPLite
Signed-off-by: Kainan Cha <kainan.zha@verisilicon.com>
This commit is contained in:
parent
0a034252c6
commit
56bd7bf8c8
8
.bazelrc
8
.bazelrc
|
|
@ -30,3 +30,11 @@ build:S905D3 --copt -Wno-unused-function
|
|||
build:S905D3 --copt -Wno-sequence-point
|
||||
build:S905D3 --copt -Wno-implicit-fallthrough
|
||||
build:S905D3 --define target_device=aarch64_S905D3
|
||||
|
||||
build:Lite_A311D --define linux=true
|
||||
build:Lite_A311D --spawn_strategy=standalone
|
||||
build:Lite_A311D --crosstool_top=@TOOLCHAINS//gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu:toolchain
|
||||
build:Lite_A311D --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
|
||||
build:Lite_A311D --cpu=aarch64
|
||||
build:Lite_A311D --compiler=gcc
|
||||
build:Lite_A311D --define target_device=VIPLite_aarch64_A311D
|
||||
|
|
|
|||
2
BUILD
2
BUILD
|
|
@ -72,7 +72,7 @@ cc_library(
|
|||
"src/tim/lite/handle.cc",
|
||||
],
|
||||
deps = [
|
||||
"//viplite:VIP_LITE_LIB",
|
||||
"//prebuilt-sdk:VIP_LITE_LIB",
|
||||
],
|
||||
linkstatic = True,
|
||||
strip_include_prefix = "include",
|
||||
|
|
|
|||
10
WORKSPACE
10
WORKSPACE
|
|
@ -25,6 +25,16 @@ http_archive(
|
|||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "VIPLite_aarch64_A311D",
|
||||
build_file = "@//prebuilt-sdk/VIPLite:BUILD",
|
||||
sha256 = "63fafc2b6d4a92389298af42a60d82bc2767abed330a8c09f7428fc3828ca31f",
|
||||
strip_prefix = "viplite",
|
||||
urls = [
|
||||
"https://github.com/VeriSilicon/TIM-VX/releases/download/v1.1.28/VIPLite_aarch64_A311D_1.3.5.tgz",
|
||||
],
|
||||
)
|
||||
|
||||
local_repository(
|
||||
name = 'TOOLCHAINS',
|
||||
path = 'toolchains',
|
||||
|
|
|
|||
|
|
@ -29,3 +29,14 @@ cc_library(
|
|||
"//conditions:default": ["//prebuilt-sdk/x86_64_linux:VIV_SDK_LIB"],
|
||||
}),
|
||||
)
|
||||
config_setting(
|
||||
name = "VIPLite_aarch64_A311D",
|
||||
values = {"define": "target_device=VIPLite_aarch64_A311D"},
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "VIP_LITE_LIB",
|
||||
deps = select({
|
||||
"VIPLite_aarch64_A311D": ["@VIPLite_aarch64_A311D//:VIP_LITE_LIB"],
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
filegroup(
|
||||
name = "libs",
|
||||
srcs = glob([
|
||||
"drivers/*.so",
|
||||
]),
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "VIP_LITE_LIB",
|
||||
hdrs = glob([
|
||||
"include/*.h"
|
||||
]),
|
||||
srcs = select({
|
||||
"//conditions:default": [":libs"],
|
||||
}),
|
||||
strip_include_prefix = "include",
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue