Hello,
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.
Thanks.
"Pedro Ferreira" <Pedro.Ferreira@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:
if( $LLVM_BUILD_TOOLS )
add_definitions( -DWE_ARE_BUILDING_WITH_TOOLS_TOO )
endif