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

jahanian fjahanian at apple.com
Fri Dec 16 11:37:17 PST 2011


On Dec 16, 2011, at 11:32 AM, Murali, Sriram wrote:

> Thanks for the comments Eric. I noticed that the test-suite works off llvm-gcc. Is there a way to use clang instead?

Try,
 make check-gcc  CC_UNDER_TEST=$CLANG

- Fariborz

> 
> -----Original Message-----
> From: Eric Christopher [mailto:echristo at apple.com] 
> Sent: Thursday, December 15, 2011 5:38 PM
> To: Murali, Sriram
> Cc: cfe-dev at cs.uiuc.edu
> Subject: Re: [cfe-dev] Link external libraries to Clang lit tests
> 
> 
> On Dec 15, 2011, at 1:30 PM, Murali, Sriram wrote:
> 
>> 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.
> 
> We really don't want executable tests in that test suite. Things that _must_ execute should go in projects/test-suite from the main llvm project. If you think you must have a testcase to test something you should probably think of a different way to test it.
> 
> -eric
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list