[LLVMdev] Compilation problem when addind a library

Rinaldini Julien julien.rinaldini at heig-vd.ch
Wed Feb 27 05:48:53 PST 2013


Hi !

Here is the situation. I created a pass in lib/Transforms/Obfuscation. I added a createFlattening() in IPO.h and in my code
to be able to use it in PassManagerBuilder.cpp (lib/Transforms/IPO) in the method PopulateModulePassManager() so I can add my pass to standard passes.

It all works if I add all my files in the lib/Transforms/IPO directory.

But I want to keep them away in the lib/Transforms/Obfuscation directory.

This is my Makefile:
LEVEL = ../../..
LIBRARYNAME = LLVMobfuscation
LOADABLE_MODULE = 1
BUILD_ARCHIVE = 1

include $(LEVEL)/Makefile.common

My CMakeListes.txt

add_llvm_library(LLVMobfuscation
  Cgf.cpp
  CgfFunction.cpp
  Flattening.cpp
  )

add_dependencies(LLVMobfuscation intrinsics_gen)

and my LLVMBuild.txt

[component_0]
type = Library
name = Obfuscation
parent = Transforms
library_name = Obfuscation

I added my directory and pass in the Transforms Makefile,LLVMBuild and CMakeLists, in the Transforms/IPO files and in the tools/opt files, but
I still get this error:

make[2]: Entering directory `/home/pyknite/work/obfuscator/3.2/build/tools/opt'
make[2]: *** No rule to make target `/home/pyknite/work/obfuscator/3.2/build/Release+Asserts/lib/libLLVMObfuscation.a', needed by `/home/pyknite/work/obfuscator/3.2/build/Release+Asserts/bin/opt'.  Stop.
make[2]: Leaving directory `/home/pyknite/work/obfuscator/3.2/build/tools/opt'

Any idea ? Thx

Cheers



More information about the llvm-dev mailing list