[PATCH][libcxx] Support command line configuration of ABI libraries for testing

Daniel Dunbar daniel at zuster.org
Tue Feb 12 11:29:11 PST 2013


LGTM, applied here:
  http://llvm.org/viewvc/llvm-project?view=revision&revision=174997

 - Daniel


On Mon, Feb 11, 2013 at 1:56 AM, Michael van der Westhuizen <
r1mikey at gmail.com> wrote:

> Hi Daniel,
>
> I've attached an updated patch that implements this flag as "link_flags",
> still respecting the use_system_lib flag.
>
> Lines are wrapped to 80 columns - I've wrapped a few extra lines too, so
> the whole file should now confirm to this standard.
>
> Michael
>
>
>
> On 08 Feb 2013, at 8:22 PM, Michael van der Westhuizen <r1mikey at gmail.com>
> wrote:
>
> Thanks for the feedback Daniel.
>
> I'll submit a new patch next week with these changes.
>
> Michael
>
> On 08 Feb 2013, at 19:49, Daniel Dunbar <daniel at zuster.org> wrote:
>
> Hi Michael,
>
> Two comments on the patch:
>
> 1. Please wrap lines to 80 columns.
>
> 2. As written, the usage isn't quite "extra" link libraries, rather it
> completely replaces the link libraries. I would propose making that part of
> the name and just calling it ldflags or link_flags, and have it completely
> override the link line (which would still get extended if use_system_lib is
> available).
>
>  - Daniel
>
>
>
> On Thu, Feb 7, 2013 at 1:10 AM, Michael van der Westhuizen <
> r1mikey at gmail.com> wrote:
>
>> Hi Daniel,
>>
>> The attached patch adds support for specifying the ABI libraries to link
>> against for testing purposes.  This, with the CMake ABI library support
>> patch I sent previously, allows me to build and test against all three
>> supported ABI libraries without source tree modifications.
>>
>> The patch adds a lit parameter called extra_link_libs, which specifies
>> the "-l" arguments to use when linking tests.  If not present, the lit.cfg
>> maintains the existing behaviour (on Linux this is suitable for libsupc++
>> only).
>>
>> To use this, from my libc++ build directory I run the following to build
>> and test against all supported ABI libraries:
>>
>> $ rm -rf * && cmake -DLIBCXX_CXX_ABI=libsupc++
>> '-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS=/usr/include/c++/4.7;/usr/include/x86_64-linux-gnu/c++/4.7'
>> -DLIT_EXECUTABLE=/home/michael/llvm/utils/lit/lit.py ../libcxx && make -j 4
>> && make check-libcxx
>> $ rm -rf * && cmake -DLIBCXX_CXX_ABI=libcxxabi
>> '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include'
>> -DLIT_EXECUTABLE=/home/michael/llvm/utils/lit/lit.py '-DLLVM_LIT_ARGS=-sv
>> --param extra_link_libs="-lc++abi -lunwind -lc -lm -lpthread -lrt -lgcc_s"'
>> ../libcxx && make -j 4 && make check-libcxx
>> $ rm -rf * && cmake -DLIBCXX_CXX_ABI=libcxxrt
>> '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src'
>> -DLIT_EXECUTABLE=/home/michael/llvm/utils/lit/lit.py '-DLLVM_LIT_ARGS=-sv
>> --param extra_link_libs="-lcxxrt -lc -lm -lpthread -lrt -lgcc_s"' ../libcxx
>> && make -j 4 && make check-libcxx
>>
>> This should be usable for testing against compiler-rt as well.
>>
>> I'll flesh out some build instructions for all the ABI variants on Linux
>> and submit those as a separate patch.
>>
>> I suppose the next big challenge would be having the driver support ABI
>> library configuration, but that's a bit beyond me at the moment!
>>
>> I'll send a separate mail to cfe-dev with current Linux test results for
>> the various ABI libraries.
>>
>> Michael
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130212/5a500791/attachment.html>


More information about the cfe-commits mailing list