[cfe-dev] Link external libraries to Clang lit tests

Murali, Sriram sriram.murali at intel.com
Thu Dec 15 13:30:51 PST 2011


Hello,
I need to link Clang, and a test case (added as the clang lit test) using an external library. I could do it by manually adding the options in the lit test.

For instance:

// RUN: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<PATH_TO_LIB>
// RUN: %clang -o %t %s -L<PATH_TO_LIB> -l<libname> -lstdc++
// RUN: %t > %t.out

<<C++ Source>>

Is there a way to add the library path in the lit test configuration, and use it on my test case? I know that I cannot expect a similar test that links with external libraries in the clang test suite. But it would be helpful if someone can share their experience trying to accomplish something.

Thanks
Sriram




More information about the cfe-dev mailing list