Commit 9a7203ce authored by Robert Kimball's avatar Robert Kimball

Merge branch 'master' into bob/static_compiler

parents 68c24ab8 7b9b35d3
...@@ -130,6 +130,12 @@ endif() ...@@ -130,6 +130,12 @@ endif()
add_library(ngraph SHARED ${SRC}) add_library(ngraph SHARED ${SRC})
# NGraph links against one or more libraries (ex. LLVM) but we don't want to
# export these symbols as part of the DSO. This is a GNU ld (and derivatives) specific
# option so making this portable is still an open issue. As a note for the future,
# this is not an issue on Windows and LLVM's lld does support --exclude-libs.
set_target_properties(ngraph PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL")
# Colon separated string for specified runtime plugin loading, this is made explicit s.t. if a # Colon separated string for specified runtime plugin loading, this is made explicit s.t. if a
# plugin is specified at compile time but the corresponding library could not be resolved at run- # plugin is specified at compile time but the corresponding library could not be resolved at run-
# time, an error will be generated. # time, an error will be generated.
...@@ -155,7 +161,7 @@ message(STATUS "LIBRARY_OUTPUT_DIRECTORY set to: ${COMMON_LIBRARY_OUTPUT_DIRECTO ...@@ -155,7 +161,7 @@ message(STATUS "LIBRARY_OUTPUT_DIRECTORY set to: ${COMMON_LIBRARY_OUTPUT_DIRECTO
target_include_directories(ngraph PUBLIC "${NGRAPH_INCLUDE_PATH}") target_include_directories(ngraph PUBLIC "${NGRAPH_INCLUDE_PATH}")
if(NGRAPH_CPU_ENABLE AND LLVM_LINK_LIBS) if(NGRAPH_CPU_ENABLE AND LLVM_LINK_LIBS)
target_link_libraries(ngraph LINK_PRIVATE ${LLVM_LINK_LIBS}) target_link_libraries(ngraph PRIVATE ${LLVM_LINK_LIBS})
endif() endif()
if (APPLE) if (APPLE)
...@@ -165,7 +171,7 @@ if (APPLE) ...@@ -165,7 +171,7 @@ if (APPLE)
endif() endif()
if(NGRAPH_CPU_ENABLE AND MKLDNN_LIB_DIR) if(NGRAPH_CPU_ENABLE AND MKLDNN_LIB_DIR)
target_link_libraries(ngraph LINK_PRIVATE mkldnn) target_link_libraries(ngraph PRIVATE mkldnn)
endif() endif()
......
...@@ -62,6 +62,7 @@ endif() ...@@ -62,6 +62,7 @@ endif()
if(LLVM_INCLUDE_DIR) if(LLVM_INCLUDE_DIR)
include_directories(SYSTEM ${LLVM_INCLUDE_DIR}) include_directories(SYSTEM ${LLVM_INCLUDE_DIR})
link_directories(${LLVM_LIB_DIR})
set(SRC ${SRC} codegen.cpp) set(SRC ${SRC} codegen.cpp)
set(BACKEND_NAMES ${BACKEND_NAMES} "CPU") set(BACKEND_NAMES ${BACKEND_NAMES} "CPU")
endif() endif()
...@@ -82,6 +83,11 @@ if(MKLDNN_INCLUDE_DIR) ...@@ -82,6 +83,11 @@ if(MKLDNN_INCLUDE_DIR)
add_dependencies(unit-test ext_mkldnn) add_dependencies(unit-test ext_mkldnn)
endif() endif()
if(LLVM_INCLUDE_DIR)
target_link_libraries(unit-test ${LLVM_LINK_LIBS})
add_dependencies(unit-test ext_llvm)
endif()
target_link_libraries(unit-test ngraph libgtest pthread) target_link_libraries(unit-test ngraph libgtest pthread)
target_link_libraries(unit-test ${CMAKE_DL_LIBS}) target_link_libraries(unit-test ${CMAKE_DL_LIBS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment