[LLVMdev] LLVM Makefile options

Óscar Fuentes ofv at wanadoo.es
Wed Jun 30 06:00:06 PDT 2010

"Pedro Ferreira" <Pedro.Ferreira at imgtec.com> writes:

> We are linking our llvm build with other libraries and for testing
> purposes we use llc (bypassing our own driver). Because our backend has
> forward dependencies to our driver we added #defines to cut out the
> dependencies on our source. When we want to compile with our own driver,
> we compile llvm with "libs-only" and simply link the libraries.
> Is there a way, on the makefile of our target machine, to know whether
> llvm is being compiled with "libs-only" target? We currently have to
> edit our sources every time we do a different build.

Dunno about the LLVM makefiles, but with the cmake build you could
achieve that by adding this to the CMakeFiles.txt of your backend:

  add_definitions( -DWE_ARE_BUILDING_WITH_TOOLS_TOO )

More information about the llvm-dev mailing list