Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
f7cf3e34
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
403
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f7cf3e34
编写于
12月 23, 2021
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(lite): fix load_and_run_depend_shared on windows
GitOrigin-RevId: 344808a3ad67e759320ada92c2ebd49875122ba3
上级
f75261d7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
33 deletion
+32
-33
lite/load_and_run/CMakeLists.txt
lite/load_and_run/CMakeLists.txt
+29
-31
lite/src/misc.h
lite/src/misc.h
+3
-2
未找到文件。
lite/load_and_run/CMakeLists.txt
浏览文件 @
f7cf3e34
...
...
@@ -27,35 +27,33 @@ if(UNIX)
endif
()
install
(
TARGETS load_and_run EXPORT
${
LITE_EXPORT_TARGETS
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
# FIXME: using shared lib to build load and run(lite shared lib is not work correctly )
# if(BUILD_SHARED_LIBS)
# add_executable(load_and_run_depends_shared ${SOURCES})
# target_link_libraries(load_and_run_depends_shared lite_shared)
# target_link_libraries(load_and_run_depends_shared megengine)
# target_link_libraries(load_and_run_depends_shared gflags)
# if(WIN32 OR MSVC)
# target_compile_definitions(load_and_run_depends_shared PRIVATE MGE_DLL_IMPORT_DATA)
# endif()
# if(LITE_BUILD_WITH_RKNPU)
# #rknn sdk1.0.0 depend on libc++_shared, use gold to remove NEEDED so symbol check
# target_link_options(load_and_run_depends_shared PRIVATE "-fuse-ld=gold")
# endif()
# if(MGE_WITH_ROCM)
# # FIXME: hip obj can not find cpp obj only through lite_static
# target_link_libraries(load_and_run_depends_shared megdnn)
# endif()
# if(UNIX)
# if(APPLE OR ANDROID)
# target_link_libraries(load_and_run_depends_shared dl)
# else()
# target_link_libraries(load_and_run_depends_shared dl rt)
# endif()
# endif()
# install(TARGETS load_and_run_depends_shared EXPORT ${MGE_EXPORT_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# endif()
if
(
BUILD_SHARED_LIBS
)
add_executable
(
load_and_run_depends_shared
${
SOURCES
}
)
target_link_libraries
(
load_and_run_depends_shared lite_shared
)
target_link_libraries
(
load_and_run_depends_shared gflags
)
target_link_libraries
(
load_and_run_depends_shared megengine
)
if
(
WIN32 OR MSVC
)
target_compile_definitions
(
load_and_run_depends_shared PRIVATE MGE_DLL_IMPORT_DATA
)
endif
()
if
(
LITE_BUILD_WITH_RKNPU
)
#rknn sdk1.0.0 depend on libc++_shared, use gold to remove NEEDED so symbol check
target_link_options
(
load_and_run_depends_shared PRIVATE
"-fuse-ld=gold"
)
endif
()
if
(
MGE_WITH_ROCM
)
# FIXME: hip obj can not find cpp obj only through lite_static
target_link_libraries
(
load_and_run_depends_shared megdnn
)
endif
()
if
(
UNIX
)
if
(
APPLE OR ANDROID
)
target_link_libraries
(
load_and_run_depends_shared dl
)
else
()
target_link_libraries
(
load_and_run_depends_shared dl rt
)
endif
()
endif
()
install
(
TARGETS load_and_run_depends_shared EXPORT
${
MGE_EXPORT_TARGETS
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
endif
()
lite/src/misc.h
浏览文件 @
f7cf3e34
...
...
@@ -40,7 +40,8 @@ private:
};
#endif
std
::
string
ssprintf
(
const
char
*
fmt
=
0
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
LITE_API
std
::
string
ssprintf
(
const
char
*
fmt
=
0
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
/*!
* \brief Print a message.
...
...
@@ -48,7 +49,7 @@ std::string ssprintf(const char* fmt = 0, ...) __attribute__((format(printf, 1,
* The message is printed only if level is above or equals to the current log
* level.
*/
void
print_log
(
LiteLogLevel
level
,
const
char
*
format
=
0
,
...)
LITE_API
void
print_log
(
LiteLogLevel
level
,
const
char
*
format
=
0
,
...)
__attribute__
((
format
(
printf
,
2
,
3
)));
}
// namespace lite
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录