[cfe-dev] [libc++] r160604 appears to have broken libc++ on linux

Howard Hinnant hhinnant at apple.com
Tue Jul 24 13:21:18 PDT 2012


On Jul 24, 2012, at 4:16 PM, "Andrew C. Morrow" <andrew.c.morrow at gmail.com> wrote:

> On Tue, Jul 24, 2012 at 3:53 PM, Howard Hinnant <hhinnant at apple.com> wrote:
>> On Jul 24, 2012, at 3:15 PM, "Andrew C. Morrow" <andrew.c.morrow at gmail.com> wrote:
>> 
>>> Thank you for your help investigating this. I reduced the test case a bit:
>> 
>> I'm working on a theory.  Question:  Are you building libc++ with -std=c++11?
>> 
>> Howard
>> 
> 
> I just double checked, and it is building libc++ with -std=c++0x. I'm
> using the CMake build for libc++, which passes it automatically. Here
> is a representative compile line:
> 
> /home/acm/opt/bin/clang++   -Dcxx_EXPORTS -DNDEBUG
> -I/home/acm/opt/include  -g -fPIC
> -I/home/acm/Documents/Develop/externals/clang-toolchain/src/libcxx/include
>   -nostdinc++ -std=c++0x -Wall -W -Wno-unused-parameter
> -Wwrite-strings -Wno-long-long -pedantic -fPIC -o
> CMakeFiles/cxx.dir/__/src/bind.cpp.o -c
> /home/acm/Documents/Develop/externals/clang-toolchain/src/libcxx/src/bind.cpp
> 
> My CMake and make invocation looks like this:
> 
> #!/bin/bash -ex
> 
> export CC=/home/acm/opt/bin/clang
> export CXX=/home/acm/opt/bin/clang++
> 
> export CXXFLAGS="-I/home/acm/opt/include"
> LINKOPTS="-L/home/acm/opt/lib -lc++abi -Wl,-z,origin -Wl,--no-undefined"
> 
> Prefix=/home/acm/opt/
> 
> ( cmake -DLIT_EXECUTABLE=/home/acm/Documents/Develop/externals/clang-toolchain/src/llvm/utils/lit/lit.py
> \
>        -DCMAKE_BUILD_TYPE=Debug \
>        -DCMAKE_INSTALL_PREFIX=$Prefix \
>        -DCMAKE_INSTALL_RPATH=\$ORIGIN/../lib \
>        -DCMAKE_SHARED_LINKER_FLAGS="$LINKOPTS" \
>         ../../../src/libcxx && \
> make -j2 all VERBOSE=1 && \
> make install ) \
> 2>&1 | tee ../libcxx.build.log
> 
> Thanks,
> Andrew

Ok, thanks, and with -std=c++0x, is constexpr turned on?

#if __has_feature(cxx_constexpr)
#error has constexpr
#else
#error doesn't have constexpr
#endif

int main()
{
}

Howard




More information about the cfe-dev mailing list