[PATCH] D16940: Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 22:45:22 PST 2016


beanz added inline comments.

================
Comment at: lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt:3
@@ -2,1 +2,3 @@
 
+set(LLVM_INTEL_JIT_LIBS)
+if( HAVE_LIBDL )
----------------
You don't need to set the variable to empty before using it. Evaluating a variable that has never been set is equivalent to evaluating one that was set to nothing.

================
Comment at: lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt:18
@@ +17,2 @@
+
+add_dependencies(LLVMIntelJITEvents intrinsics_gen)
----------------
andrew.w.kaylor wrote:
> rafael wrote:
> > Why do you need this?
> That's a good question.  There is no reason that IntelJITEvents should need this, but there is an include of attributes.inc a few levels deep in a file the gets included from IntelJITEventListener.cpp.  Something has changed in trunk in the past few days to make the build failure go away, but I haven't been able to track down what it was.  The build failure still exists in the 3.8 branch.  It looks like this:
> ```
> Building CXX object lib/ExecutionEngine/IntelJITEvents/CMakeFiles/LLVMIntelJITEvents.dir/IntelJITEventListener.cpp.o
> In file included from /users/akaylor/llvm38/llvm/include/llvm/IR/CallSite.h:31: ,
>                  from /users/akaylor/llvm38/llvm/include/llvm/Analysis/AliasAnalysis.h:42,
>                  from /users/akaylor/llvm38/llvm/include/llvm/CodeGen/MachineInstr.h:26,
>                  from /users/akaylor/llvm38/llvm/include/llvm/CodeGen/MachineBasicBlock.h:18,
>                  from /users/akaylor/llvm38/llvm/include/llvm/CodeGen/MachineFunction.h:22,
>                  from /users/akaylor/llvm38/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp:18:
> /users/akaylor/llvm38/llvm/include/llvm/IR/Attributes.h:69:38: fatal error: llvm/IR/Attributes.inc: No such file or directory
>      #include "llvm/IR/Attributes.inc"
>                                       ^
> compilation terminated.
> ```
> It may be that having the dependency here isn't the best way to fix this.
The correct way to handle this is probably to depend on CodeGen rather than intrinsics_gen. That dependency can be expressed either in CMake or in the LLVMBuild file. Doing that sets up the transitive dependency that a tool linking IntelJITEvents also needs CodeGen, Analysis and Core.


Repository:
  rL LLVM

http://reviews.llvm.org/D16940





More information about the llvm-commits mailing list