Merging r261033:
authorHans Wennborg <hans@hanshq.net>
Wed, 17 Feb 2016 16:40:51 +0000 (16:40 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 17 Feb 2016 16:40:51 +0000 (16:40 +0000)
------------------------------------------------------------------------
r261033 | akaylor | 2016-02-16 15:52:18 -0800 (Tue, 16 Feb 2016) | 5 lines

Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows

Differential Revision: http://reviews.llvm.org/D16940

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261106 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
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