Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows
authorAndrew Kaylor <andrew.kaylor@intel.com>
Tue, 16 Feb 2016 23:52:18 +0000 (23:52 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Tue, 16 Feb 2016 23:52:18 +0000 (23:52 +0000)
Differential Revision: http://reviews.llvm.org/D16940

llvm-svn: 261033

llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
llvm/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt

index 331d214..65f2a2f 100644 (file)
@@ -1,8 +1,17 @@
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
 
+if( HAVE_LIBDL )
+    set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS})
+endif()
+if( HAVE_LIBPTHREAD )
+    set(LLVM_INTEL_JIT_LIBS pthread ${LLVM_INTEL_JIT_LIBS})
+endif()
+
 add_llvm_library(LLVMIntelJITEvents
   IntelJITEventListener.cpp
   jitprofiling.c
 
-  LINK_LIBS pthread ${CMAKE_DL_LIBS}
+  LINK_LIBS ${LLVM_INTEL_JIT_LIBS}
 )
+
+add_dependencies(LLVMIntelJITEvents LLVMCodeGen)
index afea3ec..8584500 100644 (file)
@@ -21,4 +21,4 @@
 type = OptionalLibrary
 name = IntelJITEvents
 parent = ExecutionEngine
-required_libraries = Core DebugInfoDWARF Support Object ExecutionEngine
+required_libraries = CodeGen Core DebugInfoDWARF Support Object ExecutionEngine