Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
84105f49
Mace
项目概览
Xiaomi
/
Mace
通知
106
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
84105f49
编写于
1月 31, 2018
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix sh exit -1 warning
上级
dfc8d2b7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
11 deletion
+11
-11
tools/export_lib.sh
tools/export_lib.sh
+11
-11
未找到文件。
tools/export_lib.sh
浏览文件 @
84105f49
...
@@ -9,7 +9,7 @@ Usage() {
...
@@ -9,7 +9,7 @@ Usage() {
if
[
$#
-lt
4
]
;
then
if
[
$#
-lt
4
]
;
then
Usage
Usage
exit
-
1
exit
1
fi
fi
# ANDROID_ABI=arm64-v8a
# ANDROID_ABI=arm64-v8a
...
@@ -68,14 +68,14 @@ build_target()
...
@@ -68,14 +68,14 @@ build_target()
--copt
=
"-D_GLIBCXX_USE_C99_MATH_TR1"
\
--copt
=
"-D_GLIBCXX_USE_C99_MATH_TR1"
\
--copt
=
"-Werror=return-type"
\
--copt
=
"-Werror=return-type"
\
--copt
=
"-DMACE_OBFUSCATE_LITERALS"
\
--copt
=
"-DMACE_OBFUSCATE_LITERALS"
\
$DSP_MODE_BUILD_FLAGS
||
exit
-
1
$DSP_MODE_BUILD_FLAGS
||
exit
1
}
}
merge_libs
()
merge_libs
()
{
{
CREATE_LIB_NAME
=
$1
CREATE_LIB_NAME
=
$1
LIBS_LIST
=
$2
LIBS_LIST
=
$2
echo
"create
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.a"
>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
-
1
echo
"create
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.a"
>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
1
for
lib_target
in
${
LIBS_LIST
[*]
}
for
lib_target
in
${
LIBS_LIST
[*]
}
do
do
...
@@ -88,27 +88,27 @@ merge_libs()
...
@@ -88,27 +88,27 @@ merge_libs()
else
else
bin_path
=
"
${
bin_path
}
.lo"
bin_path
=
"
${
bin_path
}
.lo"
fi
fi
echo
"addlib
${
bin_path
}
"
>>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
-
1
echo
"addlib
${
bin_path
}
"
>>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
1
done
done
echo
"save"
>>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
-
1
echo
"save"
>>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
1
echo
"end"
>>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
-
1
echo
"end"
>>
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
1
$ANDROID_NDK_HOME
/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar
\
$ANDROID_NDK_HOME
/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-ar
\
-M
<
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
-
1
-M
<
${
LIBMACE_TEMP_DIR
}
/
${
CREATE_LIB_NAME
}
.mri
||
exit
1
}
}
echo
"Step 1: Generate encrypted opencl source"
echo
"Step 1: Generate encrypted opencl source"
python mace/python/tools/encrypt_opencl_codegen.py
\
python mace/python/tools/encrypt_opencl_codegen.py
\
--cl_kernel_dir
=
./mace/kernels/opencl/cl/
\
--cl_kernel_dir
=
./mace/kernels/opencl/cl/
\
--output_path
=
${
CODEGEN_DIR
}
/opencl/opencl_encrypt_program.cc
||
exit
-
1
--output_path
=
${
CODEGEN_DIR
}
/opencl/opencl_encrypt_program.cc
||
exit
1
echo
"Step 2: Generate version source"
echo
"Step 2: Generate version source"
rm
-rf
${
VERSION_CODEGEN_DIR
}
rm
-rf
${
VERSION_CODEGEN_DIR
}
mkdir
${
VERSION_CODEGEN_DIR
}
mkdir
${
VERSION_CODEGEN_DIR
}
bash mace/tools/git/gen_version_source.sh
${
CODEGEN_DIR
}
/version/version.cc
||
exit
-
1
bash mace/tools/git/gen_version_source.sh
${
CODEGEN_DIR
}
/version/version.cc
||
exit
1
echo
"Step 3: Build libmace targets"
echo
"Step 3: Build libmace targets"
...
@@ -131,8 +131,8 @@ mkdir -p ${EXPORT_INCLUDE_DIR}/mace/core/public
...
@@ -131,8 +131,8 @@ mkdir -p ${EXPORT_INCLUDE_DIR}/mace/core/public
rm
-rf
${
EXPORT_LIB_DIR
}
rm
-rf
${
EXPORT_LIB_DIR
}
mkdir
-p
${
EXPORT_LIB_DIR
}
mkdir
-p
${
EXPORT_LIB_DIR
}
cp
${
MACE_SOURCE_DIR
}
/mace/core/public/
*
${
EXPORT_INCLUDE_DIR
}
/mace/core/public
||
exit
-
1
cp
${
MACE_SOURCE_DIR
}
/mace/core/public/
*
${
EXPORT_INCLUDE_DIR
}
/mace/core/public
||
exit
1
cp
${
LIBMACE_TEMP_DIR
}
/libmace.a
${
LIBMACE_TEMP_DIR
}
/libmace_dev.a
${
LIBMACE_TEMP_DIR
}
/libmace_prod.a
${
EXPORT_LIB_DIR
}
/
||
exit
-
1
cp
${
LIBMACE_TEMP_DIR
}
/libmace.a
${
LIBMACE_TEMP_DIR
}
/libmace_dev.a
${
LIBMACE_TEMP_DIR
}
/libmace_prod.a
${
EXPORT_LIB_DIR
}
/
||
exit
1
echo
"Step 6: Remove temporary file"
echo
"Step 6: Remove temporary file"
rm
-rf
${
LIBMACE_TEMP_DIR
}
rm
-rf
${
LIBMACE_TEMP_DIR
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录