未验证 提交 3138e7aa 编写于 作者: W winter-wang 提交者: GitHub

[IR]test ir dynamic library. (#55113)

上级 bf92ccc7
......@@ -705,9 +705,7 @@ else()
endif()
if(NOT WITH_SHARED_IR)
if(WIN32)
add_definitions(-DIR_API=)
endif()
add_definitions(-DSTATIC_IR)
endif()
if(WITH_STRIP)
......
add_definitions(-DIR_LIBRARY)
set_property(GLOBAL PROPERTY IR_TARGETS "")
set_property(GLOBAL PROPERTY IR_MODULES "")
function(ir_library TARGET_NAME)
......@@ -33,10 +34,6 @@ function(ir_library TARGET_NAME)
endif()
endfunction()
if(WITH_SHARED_IR)
add_definitions(-DIR_DLL_EXPORT)
endif()
add_subdirectory(core)
add_subdirectory(pass)
add_subdirectory(pattern_rewrite)
......
......@@ -13,15 +13,13 @@
// limitations under the License.
#pragma once
#define IR_API
#if defined(_WIN32)
#ifndef IR_API
#ifdef IR_DLL_EXPORT
#ifndef STATIC_IR
#ifdef IR_LIBRARY
#define IR_API __declspec(dllexport)
#else
#define IR_API __declspec(dllimport)
#endif // IR_DLL_EXPORT
#endif // IR_API
#else
#define IR_API
#endif // IR_LIBRARY
#endif // STATIC_IR
#endif // _WIN32
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册