Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
8618a432
Mace
项目概览
Xiaomi
/
Mace
通知
107
Star
40
Fork
27
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8618a432
编写于
5月 07, 2019
作者:
L
luxuhui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile error on darwin
N/A Signed-off-by:
N
Luxuhui
<
luxuhui@xiaomi.com
>
上级
d085fecb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
4 deletion
+26
-4
mace/BUILD.bazel
mace/BUILD.bazel
+8
-0
mace/libmace/BUILD.bazel
mace/libmace/BUILD.bazel
+8
-4
mace/mace.bzl
mace/mace.bzl
+6
-0
tools/bazel.rc
tools/bazel.rc
+4
-0
未找到文件。
mace/BUILD.bazel
浏览文件 @
8618a432
config_setting
(
name
=
"linux_base"
,
define_values
=
{
"linux_base"
:
"true"
,
},
visibility
=
[
"//visibility:public"
],
)
config_setting
(
config_setting
(
name
=
"android"
,
name
=
"android"
,
values
=
{
values
=
{
...
...
mace/libmace/BUILD.bazel
浏览文件 @
8618a432
...
@@ -15,6 +15,7 @@ load(
...
@@ -15,6 +15,7 @@ load(
"if_hexagon_enabled"
,
"if_hexagon_enabled"
,
"if_hta_enabled"
,
"if_hta_enabled"
,
"if_linux"
,
"if_linux"
,
"if_linux_base"
,
"if_neon_enabled"
,
"if_neon_enabled"
,
"if_opencl_enabled"
,
"if_opencl_enabled"
,
"if_openmp_enabled"
,
"if_openmp_enabled"
,
...
@@ -99,9 +100,10 @@ genrule(
...
@@ -99,9 +100,10 @@ genrule(
"//mace/public"
,
"//mace/public"
,
"//mace/utils"
,
"//mace/utils"
,
"//mace/proto:mace_cc"
,
"//mace/proto:mace_cc"
,
"//mace/port/linux_base:port_linux_base"
,
"@com_google_protobuf//:protobuf_lite"
,
"@com_google_protobuf//:protobuf_lite"
,
]
+
if_android
([
]
+
if_linux_base
([
"//mace/port/linux_base:port_linux_base"
,
])
+
if_android
([
"//mace/port/android:port_android"
,
"//mace/port/android:port_android"
,
])
+
if_linux
([
])
+
if_linux
([
"//mace/port/linux:port_linux"
,
"//mace/port/linux:port_linux"
,
...
@@ -134,13 +136,15 @@ genrule(
...
@@ -134,13 +136,15 @@ genrule(
"$(locations //mace/libmace:libmace) "
+
"$(locations //mace/libmace:libmace) "
+
"$(locations //mace/port:port_base) "
+
"$(locations //mace/port:port_base) "
+
"$(locations //mace/port/posix:port_posix) "
+
"$(locations //mace/port/posix:port_posix) "
+
if_linux_base
(
"$(locations //mace/port/linux_base:port_linux_base) "
,
default_value
=
""
,
)
+
if_android
(
if_android
(
"$(locations //mace/port/linux_base:port_linux_base) "
+
"$(locations //mace/port/android:port_android) "
,
"$(locations //mace/port/android:port_android) "
,
default_value
=
""
,
default_value
=
""
,
)
+
)
+
if_linux
(
if_linux
(
"$(locations //mace/port/linux_base:port_linux_base) "
+
"$(locations //mace/port/linux:port_linux) "
,
"$(locations //mace/port/linux:port_linux) "
,
default_value
=
""
,
default_value
=
""
,
)
+
)
+
...
...
mace/mace.bzl
浏览文件 @
8618a432
# -*- Python -*-
# -*- Python -*-
def
if_linux_base
(
a
,
default_value
=
[]):
return
select
({
"//mace:linux_base"
:
a
,
"//conditions:default"
:
default_value
,
})
def
if_android
(
a
,
default_value
=
[]):
def
if_android
(
a
,
default_value
=
[]):
return
select
({
return
select
({
"//mace:android"
:
a
,
"//mace:android"
:
a
,
...
...
tools/bazel.rc
浏览文件 @
8618a432
...
@@ -12,6 +12,7 @@ build --copt=-DGEMMLOWP_USE_MACE_THREAD_POOL
...
@@ -12,6 +12,7 @@ build --copt=-DGEMMLOWP_USE_MACE_THREAD_POOL
build --copt=-DMACE_DEPTHWISE_U8_USE_MULTI_THREAD
build --copt=-DMACE_DEPTHWISE_U8_USE_MULTI_THREAD
# Usage example: bazel build --config android
# Usage example: bazel build --config android
build:android --define linux_base=true
build:android --linkopt=-pie
build:android --linkopt=-pie
build:android --linkopt=-ldl
build:android --linkopt=-ldl
build:android --linkopt=-llog
build:android --linkopt=-llog
...
@@ -24,6 +25,7 @@ build:android --copt -Wno-mismatched-tags
...
@@ -24,6 +25,7 @@ build:android --copt -Wno-mismatched-tags
build:android --copt -Wno-missing-braces
build:android --copt -Wno-missing-braces
# Linux host build, --config linux
# Linux host build, --config linux
build:linux --define linux_base=true
build:linux --define linux=true
build:linux --define linux=true
# MacOS host build, --config darwin
# MacOS host build, --config darwin
...
@@ -44,6 +46,7 @@ build:ios --copt -Wno-missing-braces
...
@@ -44,6 +46,7 @@ build:ios --copt -Wno-missing-braces
# Used to fix library not find linking issue, see also:
# Used to fix library not find linking issue, see also:
# https://github.com/bazelbuild/bazel/issues/6653,
# https://github.com/bazelbuild/bazel/issues/6653,
# https://github.com/bazelbuild/bazel/issues/6189
# https://github.com/bazelbuild/bazel/issues/6189
build:arm_linux_gnueabihf --define linux_base=true
build:arm_linux_gnueabihf --define linux=true
build:arm_linux_gnueabihf --define linux=true
build:arm_linux_gnueabihf --spawn_strategy=standalone
build:arm_linux_gnueabihf --spawn_strategy=standalone
build:arm_linux_gnueabihf --distinct_host_configuration=true
build:arm_linux_gnueabihf --distinct_host_configuration=true
...
@@ -58,6 +61,7 @@ build:arm_linux_gnueabihf --copt -Wno-sequence-point
...
@@ -58,6 +61,7 @@ build:arm_linux_gnueabihf --copt -Wno-sequence-point
build:arm_linux_gnueabihf --copt -Wno-implicit-fallthrough
build:arm_linux_gnueabihf --copt -Wno-implicit-fallthrough
# Usage example: bazel build --config aarch64_linux_gnu
# Usage example: bazel build --config aarch64_linux_gnu
build:aarch64_linux_gnu --define linux_base=true
build:aarch64_linux_gnu --define linux=true
build:aarch64_linux_gnu --define linux=true
build:aarch64_linux_gnu --spawn_strategy=standalone
build:aarch64_linux_gnu --spawn_strategy=standalone
build:aarch64_linux_gnu --distinct_host_configuration=true
build:aarch64_linux_gnu --distinct_host_configuration=true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录