[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: [libcxx] r243574 - Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLV
From: Kostya Serebryany <kcc () google ! com>
Date: 2015-07-29 23:40:41
Message-ID: CAN=P9ph-+WeLJESmF8wxEz8ggM05a9pbU2Ze9RiP68TM5SqnTg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I still see the failures with r243591
On Wed, Jul 29, 2015 at 4:24 PM, Eric Fiselier <eric@efcs.ca> wrote:
> I just pushed a possible fix to libc++. Let me know ASAP if that
> doesn't fix the issue. I'll revert if r243591 doesn't work.
>
> /Eric
>
> On Wed, Jul 29, 2015 at 6:44 PM, Alexey Samsonov <vonosmas@gmail.com>
> wrote:
> > Eric,
> >
> > Looks like it breaks the build of compiler-rt on Linux, and we can't fix
> it
> > instantly, sorry =/
> > Could you please revert it again?
> >
> > The problem is that when I pass correct -DLLVM_CONFIG= value when
> > configuring standalone libcxx with
> > just-built Clang, libcxx invokes
> llvm/cmake/modules/HandleLLVMOptions.cmake,
> > and it fails with an error
> > "Host Clang version must be at least 3.1!",
> > because CMake is unable to properly determine the compiler version of
> > just-built Clang as 3.8.0 for
> > some reason(?!) I'm now looking into this issue, and will provide a
> patch to
> > compiler-rt that should accompany
> > re-land of libcxx CMake changes.
> >
> > On Wed, Jul 29, 2015 at 3:05 PM, Eric Fiselier <eric@efcs.ca> wrote:
> > >
> > > Libc++ standalone builds now require that libc++ can find the LLVM
> source
> > > directory. If you specify the LLVM source root using
> > > "-DLLVM_PATH=path/to/llvm" then the command should work?
> > >
> > > Does this new requirement work for you?
> > >
> > > On Jul 29, 2015 6:03 PM, "Alexey Samsonov" <samsonov@google.com> wrote:
> > > >
> > > > I'm looking into the fix now, it probably should go to compiler-rt
> > > > anyway, so I don't think we should revert libcxx part now.
> > > >
> > > > On Wed, Jul 29, 2015 at 2:59 PM, Kostya Serebryany <kcc@google.com>
> > > > wrote:
> > > > >
> > > > > Eric,
> > > > > If there is no quick fix, will you be able to revert this, please?
> > > > >
> > > > > On Wed, Jul 29, 2015 at 2:56 PM, Evgenii Stepanov
> > > > > <eugeni.stepanov@gmail.com> wrote:
> > > > > >
> > > > > > And the log says:
> > > > > >
> > > > > > CMake Error at cmake/Modules/FindLLVM.cmake:41 (message):
> > > > > > llvm-config not found and LLVM_MAIN_SRC_DIR not defined.
> Reconfigure
> > > > > > with
> > > > > > -DLLVM_CONFIG=path/to/llvm-config or
> > > > > > -DLLVM_PATH=path/to/llvm-source-root.
> > > > > > Call Stack (most recent call first):
> > > > > > CMakeLists.txt:37 (include)
> > > > > >
> > > > > > On Wed, Jul 29, 2015 at 2:49 PM, Kostya Serebryany <kcc@google.com>
> > > > > > wrote:
> > > > > > > I am seeing build failure when trying to run "ninja check-msan":
> > > > > > >
> > > > > > > [39/58] Performing configure step for 'libcxx_msan-with-call'
> > > > > > > FAILED: cd
> > > > > > >
> > > > > > >
> /usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/libcxx_msan-with-call/src/libcxx_msan-with-call-build
>
> > > > > > > && /usr/bin/cmake -P
> > > > > > >
> > > > > > >
> /usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure.cmake
>
> > > > > > > && /usr/bin/cmake -E touch
> > > > > > >
> > > > > > >
> /usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure
>
> > > > > > > CMake Error at
> > > > > > >
> > > > > > >
> /usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure.cmake:16
>
> > > > > > > (message):
> > > > > > > Command failed: 1
> > > > > > >
> > > > > > > '/usr/bin/cmake'
> > > > > > >
> > > > > > >
> '-DCMAKE_C_COMPILER=/usr/local/google/home/kcc/llvm-gcc-build/./bin/clang'
> > > > > > >
> > > > > > >
> '-DCMAKE_CXX_COMPILER=/usr/local/google/home/kcc/llvm-gcc-build/./bin/clang'
> > > > > > > '-DCMAKE_C_FLAGS= -fsanitize=memory -fsanitize-memory-track-origins
> > > > > > > -Wno-pedantic -fsanitize=memory -fsanitize-memory-track-origins
> > > > > > > -Wno-pedantic -mllvm -msan-instrumentation-with-call-threshold=0'
> > > > > > > '-DCMAKE_CXX_FLAGS= -fsanitize=memory
> -fsanitize-memory-track-origins
> > > > > > > -Wno-pedantic -fsanitize=memory -fsanitize-memory-track-origins
> > > > > > > -Wno-pedantic -mllvm -msan-instrumentation-with-call-threshold=0'
> > > > > > > '-DCMAKE_BUILD_TYPE=Release'
> > > > > > >
> > > > > > >
> '-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call'
>
> > > > > > > '-GNinja' '/usr/local/google/home/kcc/llvm/projects/libcxx'
> > > > > > >
> > > > > > > See also
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> /usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure-*.log
>
> > > > > > >
> > > > > > >
> > > > > > > Looks like this is the only change that might have caused this.
> > > > > > >
> > > > > > > On Wed, Jul 29, 2015 at 2:07 PM, Eric Fiselier <eric@efcs.ca>
> wrote:
> > > > > > > >
> > > > > > > > Author: ericwf
> > > > > > > > Date: Wed Jul 29 16:07:28 2015
> > > > > > > > New Revision: 243574
> > > > > > > >
> > > > > > > > URL: http://llvm.org/viewvc/llvm-project?rev=243574&view=rev
> > > > > > > > Log:
> > > > > > > > Recommit r243503 "[libcxx] Cleanup CMake configuration and
> integrate
> > > > > > > > with
> > > > > > > > LLVM"
> > > > > > > >
> > > > > > > > This change was reverted in r243550 because it broke clang-format
> > > > > > > > builds
> > > > > > > > (see PR24306).
> > > > > > > >
> > > > > > > > This patch recommits a fixed version of the original.
> > > > > > > >
> > > > > > > > Added:
> > > > > > > > libcxx/trunk/cmake/Modules/FindLLVM.cmake
> > > > > > > > libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake
> > > > > > > > Modified:
> > > > > > > > libcxx/trunk/CMakeLists.txt
> > > > > > > > libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
> > > > > > > > libcxx/trunk/cmake/config-ix.cmake
> > > > > > > > libcxx/trunk/lib/CMakeLists.txt
> > > > > > > > libcxx/trunk/test/CMakeLists.txt
> > > > > > > > libcxx/trunk/test/lit.site.cfg.in
> > > > > > > > libcxx/trunk/www/index.html
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/CMakeLists.txt
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/CMakeLists.txt (original)
> > > > > > > > +++ libcxx/trunk/CMakeLists.txt Wed Jul 29 16:07:28 2015
> > > > > > > > @@ -3,13 +3,16 @@
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > # Setup Project
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > -
> > > > > > > > -project(libcxx CXX C)
> > > > > > > > cmake_minimum_required(VERSION 2.8)
> > > > > > > >
> > > > > > > > if(POLICY CMP0042)
> > > > > > > > cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default
> > > > > > > > endif()
> > > > > > > > +if(POLICY CMP0022)
> > > > > > > > + cmake_policy(SET CMP0022 NEW) # Required when interacting with
> > > > > > > > LLVM and
> > > > > > > > Clang
> > > > > > > > +endif()
> > > > > > > > +
> > > > > > > > +project(libcxx CXX C)
> > > > > > > >
> > > > > > > > set(PACKAGE_NAME libcxx)
> > > > > > > > set(PACKAGE_VERSION trunk-svn)
> > > > > > > > @@ -30,52 +33,90 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
> > > > > > > > build directory and run 'cmake /path/to/${PROJECT_NAME}
> [options]'
> > > > > > > > there."
> > > > > > > > )
> > > > > > > >
> > > > > > > > -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
> > > > > > > > - set(LIBCXX_LIBDIR_SUFFIX "" CACHE STRING
> > > > > > > > - "Define suffix of library directory name (32/64)")
> > > > > > > > -
> > > > > > > > - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
> > > > > > > > ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
> > > > > > > > - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
> > > > > > > > ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
> > > > > > > > -
> > > > > > > > - set(LIBCXX_BUILT_STANDALONE 1)
> > > > > > > > -else()
> > > > > > > > - set(LIBCXX_LIBDIR_SUFFIX ${LLVM_LIBDIR_SUFFIX})
> > > > > > > > -endif()
> > > > > > > > +# Find the required bits of LLVM
> > > > > > > > +include(FindLLVM)
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > # Setup CMake Options
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > >
> > > > > > > > -# Define options.
> > > > > > > > -option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)
> > > > > > > > -option(LIBCXX_ENABLE_RTTI "Use run time type information." ON)
> > > > > > > > +# Basic options
> > > > > > > > ---------------------------------------------------------------
> > > > > > > > option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent of
> > > > > > > > build
> > > > > > > > mode." ON)
> > > > > > > > -option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled."
> ON)
> > > > > > > > -option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning is
> > > > > > > > triggered."
> > > > > > > > OFF)
> > > > > > > > -option(LIBCXX_ENABLE_CXX1Y "Enable -std=c++1y and use of c++1y
> > > > > > > > language
> > > > > > > > features if the compiler supports it." OFF)
> > > > > > > > option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library."
> ON)
> > > > > > > > +
> > > > > > > > +set(LIBCXX_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
> > > > > > > > + "Define suffix of library directory name (32/64)")
> > > > > > > > +option(LIBCXX_INSTALL_HEADERS "Install the libc++ headers." ON)
> > > > > > > > +option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support
> > > > > > > > headers."
> > > > > > > > ON)
> > > > > > > > +
> > > > > > > > +# ABI Library options
> > > > > > > > ---------------------------------------------------------
> > > > > > > > +set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
> > > > > > > > + "Specify C++ ABI library to use." FORCE)
> > > > > > > > +set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
> > > > > > > > +set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
> > > > > > > > +
> > > > > > > > +option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI
> > > > > > > > library"
> > > > > > > > OFF)
> > > > > > > > +
> > > > > > > > +# Build libc++abi with libunwind. We need this option to
> determine
> > > > > > > > whether to
> > > > > > > > +# link with libunwind or libgcc_s while running the test cases.
> > > > > > > > +option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM
> > > > > > > > unwinder."
> > > > > > > > OFF)
> > > > > > > > +
> > > > > > > > +# Target options
> > > > > > > > --------------------------------------------------------------
> > > > > > > > +option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." OFF)
> > > > > > > > +set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate sysroot.")
> > > > > > > > +set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING "Use alternate GCC
> > > > > > > > toolchain.")
> > > > > > > > +
> > > > > > > > +# Feature options
> > > > > > > > -------------------------------------------------------------
> > > > > > > > +option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)
> > > > > > > > +option(LIBCXX_ENABLE_RTTI "Use run time type information." ON)
> > > > > > > > option(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE "Build libc++
> with
> > > > > > > > support for the global filesystem namespace." ON)
> > > > > > > > option(LIBCXX_ENABLE_STDIN "Build libc++ with support for
> > > > > > > > stdin/std::cin." ON)
> > > > > > > > option(LIBCXX_ENABLE_STDOUT "Build libc++ with support for
> > > > > > > > stdout/std::cout." ON)
> > > > > > > > option(LIBCXX_ENABLE_THREADS "Build libc++ with support for
> > > > > > > > threads." ON)
> > > > > > > > option(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS "Build libc++ with
> > > > > > > > support
> > > > > > > > for thread-unsafe C functions" ON)
> > > > > > > > -option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++" OFF)
> > > > > > > > option(LIBCXX_ENABLE_MONOTONIC_CLOCK
> > > > > > > > "Build libc++ with support for a monotonic clock.
> > > > > > > > This option may only be used when LIBCXX_ENABLE_THREADS=OFF."
> > > > > > > > ON)
> > > > > > > > -option(LIBCXX_INSTALL_HEADERS "Install the libc++ headers." ON)
> > > > > > > > -option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support
> > > > > > > > headers."
> > > > > > > > ON)
> > > > > > > > +
> > > > > > > > +# Misc options
> > > > > > > > ----------------------------------------------------------------
> > > > > > > > +option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled."
> ON)
> > > > > > > > +option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning is
> > > > > > > > triggered."
> > > > > > > > OFF)
> > > > > > > > +
> > > > > > > > option(LIBCXX_GENERATE_COVERAGE "Enable generating code
> coverage."
> > > > > > > > OFF)
> > > > > > > > set(LIBCXX_COVERAGE_LIBRARY "" CACHE STRING
> > > > > > > > - "The Profile-rt library used to build with code coverage")
> > > > > > > > -option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI
> > > > > > > > library"
> > > > > > > > OFF)
> > > > > > > > -set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate sysroot.")
> > > > > > > > -set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING "Use alternate GCC
> > > > > > > > toolchain.")
> > > > > > > > -if (LIBCXX_BUILT_STANDALONE)
> > > > > > > > - set(LLVM_USE_SANITIZER "" CACHE STRING
> > > > > > > > - "Define the sanitizer used to build the library and tests")
> > > > > > > > + "The Profile-rt library used to build with code coverage")
> > > > > > > > +
> > > > > > > >
> > > > > > > >
> > > > > > > >
> +#===============================================================================
> > > > > > > > +# Check option configurations
> > > > > > > >
> > > > > > > >
> > > > > > > >
> +#===============================================================================
> > > > > > > > +
> > > > > > > > +# Ensure LIBCXX_ENABLE_MONOTONIC_CLOCK is set to ON only when
> > > > > > > > +# LIBCXX_ENABLE_THREADS is on.
> > > > > > > > +if(LIBCXX_ENABLE_THREADS AND NOT LIBCXX_ENABLE_MONOTONIC_CLOCK)
> > > > > > > > + message(FATAL_ERROR "LIBCXX_ENABLE_MONOTONIC_CLOCK can only be
> > > > > > > > set to
> > > > > > > > OFF"
> > > > > > > > + " when LIBCXX_ENABLE_THREADS is also set to
> > > > > > > > OFF.")
> > > > > > > > +endif()
> > > > > > > > +
> > > > > > > > +# Ensure LLVM_USE_SANITIZER is not specified when
> > > > > > > > LIBCXX_GENERATE_COVERAGE
> > > > > > > > +# is ON.
> > > > > > > > +if (LLVM_USE_SANITIZER AND LIBCXX_GENERATE_COVERAGE)
> > > > > > > > + message(FATAL_ERROR "LLVM_USE_SANITIZER cannot be used with
> > > > > > > > LIBCXX_GENERATE_COVERAGE")
> > > > > > > > +endif()
> > > > > > > > +
> > > > > > > > +# Set LIBCXX_BUILD_32_BITS to (LIBCXX_BUILD_32_BITS OR
> > > > > > > > LLVM_BUILD_32_BITS)
> > > > > > > > +# and check that we can build with 32 bits if requested.
> > > > > > > > +if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)
> > > > > > > > + if (LIBCXX_BUILD_32_BITS OR LLVM_BUILD_32_BITS)
> > > > > > > > + if (NOT LLVM_BUILD_32_BITS) # Don't duplicate the output from
> > > > > > > > LLVM
> > > > > > > > + message(STATUS "Building 32 bits executables and
> libraries.")
> > > > > > > > + endif()
> > > > > > > > + set(LIBCXX_BUILD_32_BITS ON CACHE BOOL "" FORCE)
> > > > > > > > + endif()
> > > > > > > > +elseif(LIBCXX_BUILD_32_BITS)
> > > > > > > > + message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported
> on
> > > > > > > > this
> > > > > > > > platform.")
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > +# Check that this option is not enabled on Apple and emit a usage
> > > > > > > > warning.
> > > > > > > > if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
> > > > > > > > if (APPLE)
> > > > > > > > message(FATAL_ERROR "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is not
> > > > > > > > supported on OS X")
> > > > > > > > @@ -84,27 +125,6 @@ if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
> > > > > > > > endif()
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > -set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
> > > > > > > > -if (NOT LIBCXX_CXX_ABI)
> > > > > > > > - if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
> > > > > > > > - IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
> > > > > > > > - set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
> > > > > > > > - set(LIBCXX_CXX_ABI_INCLUDE_PATHS
> > > > > > > > "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
> > > > > > > > - set(LIBCXX_CXX_ABI_INTREE 1)
> > > > > > > > - else ()
> > > > > > > > - set(LIBCXX_CXX_ABI_LIBNAME "none")
> > > > > > > > - endif ()
> > > > > > > > -else ()
> > > > > > > > - set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
> > > > > > > > -endif ()
> > > > > > > > -set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
> > > > > > > > - "Specify C++ ABI library to use." FORCE)
> > > > > > > > -set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
> > > > > > > > -
> > > > > > > > -# Build libc++abi with libunwind. We need this option to
> determine
> > > > > > > > whether to
> > > > > > > > -# link with libunwind or libgcc_s while running the test cases.
> > > > > > > > -option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM
> > > > > > > > unwinder."
> > > > > > > > OFF)
> > > > > > > > -
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > # Configure System
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > @@ -114,234 +134,113 @@ set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_S
> > > > > > > > set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
> > > > > > > > set(LIBCXX_LIBRARY_DIR
> > > > > > > > ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
> > > > > > > >
> > > > > > > > +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
> > > > > > > > +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
> > > > > > > > +
> > > > > > > > # Declare libc++ configuration variables.
> > > > > > > > # They are intended for use as follows:
> > > > > > > > # LIBCXX_CXX_FLAGS: General flags for both the compiler and
> linker.
> > > > > > > > # LIBCXX_COMPILE_FLAGS: Compile only flags.
> > > > > > > > # LIBCXX_LINK_FLAGS: Linker only flags.
> > > > > > > > -set(LIBCXX_CXX_FLAGS "")
> > > > > > > > set(LIBCXX_COMPILE_FLAGS "")
> > > > > > > > set(LIBCXX_LINK_FLAGS "")
> > > > > > > > +set(LIBCXX_LIBRARIES "")
> > > > > > > >
> > > > > > > > # Configure compiler.
> > > > > > > > include(config-ix)
> > > > > > > > -# Configure ABI library
> > > > > > > > -include(HandleLibCXXABI)
> > > > > > > > +
> > > > > > > > # Configure coverage options.
> > > > > > > > if (LIBCXX_GENERATE_COVERAGE)
> > > > > > > > include(CodeCoverage)
> > > > > > > > set(CMAKE_BUILD_TYPE "COVERAGE" CACHE STRING "" FORCE)
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > +string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
> > > > > > > > +
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > # Setup Compiler Flags
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > >
> > > > > > > > -# Get required flags.
> > > > > > > > -# On all systems the system c++ standard library headers need to
> be
> > > > > > > > excluded.
> > > > > > > > -if (MSVC)
> > > > > > > > - # MSVC only has -X, which disables all default includes;
> > > > > > > > including the
> > > > > > > > crt.
> > > > > > > > - # Thus, we do nothing and hope we don't accidentally include
> any
> > > > > > > > of the
> > > > > > > > C++
> > > > > > > > - # headers.
> > > > > > > > -else()
> > > > > > > > - if (LIBCXX_HAS_NOSTDINCXX_FLAG)
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS -nostdinc++)
> > > > > > > > - string(REPLACE "-stdlib=libc++" "" CMAKE_CXX_FLAGS
> > > > > > > > "${CMAKE_CXX_FLAGS}")
> > > > > > > > - string(REPLACE "-stdlib=libstdc++" "" CMAKE_CXX_FLAGS
> > > > > > > > "${CMAKE_CXX_FLAGS}")
> > > > > > > > - endif()
> > > > > > > > - # If c++1y has been enabled then attempt to use it. Fail if it
> is
> > > > > > > > no
> > > > > > > > supported
> > > > > > > > - # by the compiler. Otherwise choose c++11 and ensure the
> compiler
> > > > > > > > supports it.
> > > > > > > > - if (LIBCXX_ENABLE_CXX1Y)
> > > > > > > > - if (LIBCXX_HAS_STDCXX1Y_FLAG)
> > > > > > > > - set(LIBCXX_STD_VERSION c++1y)
> > > > > > > > - else()
> > > > > > > > - message(FATAL_ERROR "c++1y was enabled but the compiler
> does
> > > > > > > > not
> > > > > > > > support it.")
> > > > > > > > - endif()
> > > > > > > > - else()
> > > > > > > > - if (LIBCXX_HAS_STDCXX11_FLAG)
> > > > > > > > - set(LIBCXX_STD_VERSION c++11)
> > > > > > > > - else()
> > > > > > > > - message(FATAL_ERROR "c++11 is required by libc++ but is not
> > > > > > > > supported by the compiler")
> > > > > > > > - endif()
> > > > > > > > - endif()
> > > > > > > > - # LIBCXX_STD_VERSION should always be set at this point.
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS "-std=${LIBCXX_STD_VERSION}")
> > > > > > > > -endif()
> > > > > > > > +include(HandleLibCXXABI) # Steup the ABI library flags
> > > > > > > >
> > > > > > > > -macro(append_if list condition var)
> > > > > > > > - if (${condition})
> > > > > > > > - list(APPEND ${list} ${var})
> > > > > > > > - endif()
> > > > > > > > -endmacro()
> > > > > > > > +# Include macros for adding and removing libc++ flags.
> > > > > > > > +include(HandleLibcxxFlags)
> > > > > > > >
> > > > > > > > -# Get warning flags
> > > > > > > > -# Disable the system header pragma.
> > > > > > > > -add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
> > > > > > > > -if (NOT MSVC)
> > > > > > > > - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WALL_FLAG -Wall)
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS -Werror=return-type)
> > > > > > > > +# Remove flags that may have snuck in.
> > > > > > > > +remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG
> > > > > > > > + -stdlib=libc++ -stdlib=libstdc++ -lc++abi -m32)
> > > > > > > > +
> > > > > > > > +# Required flags
> > > > > > > > ==============================================================
> > > > > > > > +add_compile_flags_if_supported(-std=c++11)
> > > > > > > > +if (NOT MSVC AND NOT LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG)
> > > > > > > > + message(FATAL_ERROR "C++11 is required but the compiler does
> not
> > > > > > > > support -std=c++11")
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_W_FLAG -W)
> > > > > > > > -append_if(LIBCXX_COMPILE_FLAGS
> LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG
> > > > > > > > -Wno-unused-parameter)
> > > > > > > > -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WWRITE_STRINGS_FLAG
> > > > > > > > -Wwrite-strings)
> > > > > > > > -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WNO_LONG_LONG_FLAG
> > > > > > > > -Wno-long-long)
> > > > > > > > +# On all systems the system c++ standard library headers need to
> be
> > > > > > > > excluded.
> > > > > > > > +# MSVC only has -X, which disables all default includes;
> including
> > > > > > > > the
> > > > > > > > crt.
> > > > > > > > +# Thus, we do nothing and hope we don't accidentally include any
> of
> > > > > > > > the
> > > > > > > > C++
> > > > > > > > +# headers
> > > > > > > > +add_compile_flags_if_supported(-nostdinc++)
> > > > > > > > +
> > > > > > > > +# Target flags
> > > > > > > > ================================================================
> > > > > > > > +add_flags_if(LIBCXX_BUILD_32_BITS -m32)
> > > > > > > > +add_flags_if(LIBCXX_TARGET_TRIPLE "-target
> > > > > > > > ${LIBCXX_TARGET_TRIPLE}")
> > > > > > > > +add_flags_if(LIBCXX_SYSROOT "--sysroot ${LIBCXX_SYSROOT}")
> > > > > > > > +add_flags_if(LIBCXX_GCC_TOOLCHAIN "-gcc-toolchain
> > > > > > > > ${LIBCXX_GCC_TOOLCHAIN}")
> > > > > > > > +
> > > > > > > > +# Warning flags
> > > > > > > > ===============================================================
> > > > > > > > +add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
> > > > > > > > +add_compile_flags_if_supported(
> > > > > > > > + -Wall -W -Wwrite-strings
> > > > > > > > + -Wno-unused-parameter -Wno-long-long
> > > > > > > > + -Werror=return-type)
> > > > > > > > if (LIBCXX_ENABLE_WERROR)
> > > > > > > > - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WERROR_FLAG -Werror)
> > > > > > > > - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WX_FLAG -WX)
> > > > > > > > -else()
> > > > > > > > - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WNO_ERROR_FLAG
> > > > > > > > -Wno-error)
> > > > > > > > - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_NO_WX_FLAG -WX-)
> > > > > > > > + add_compile_flags_if_supported(-Werror)
> > > > > > > > + add_compile_flags_if_supported(-WX)
> > > > > > > > endif()
> > > > > > > > if (LIBCXX_ENABLE_PEDANTIC)
> > > > > > > > - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_PEDANTIC_FLAG
> > > > > > > > -pedantic)
> > > > > > > > + add_compile_flags_if_supported(-pedantic)
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > -# Get feature flags.
> > > > > > > > -# Exceptions
> > > > > > > > +# Exception flags
> > > > > > > > =============================================================
> > > > > > > > if (LIBCXX_ENABLE_EXCEPTIONS)
> > > > > > > > # Catches C++ exceptions only and tells the compiler to assume
> > > > > > > > that
> > > > > > > > extern C
> > > > > > > > # functions never throw a C++ exception.
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_EHSC_FLAG -EHsc)
> > > > > > > > + add_compile_flags_if_supported(-EHsc)
> > > > > > > > else()
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS -D_LIBCPP_NO_EXCEPTIONS)
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_NO_EHS_FLAG -EHs-)
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_NO_EHA_FLAG -EHa-)
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_FNO_EXCEPTIONS_FLAG
> > > > > > > > -fno-exceptions)
> > > > > > > > + add_definitions(-D_LIBCPP_NO_EXCEPTIONS)
> > > > > > > > + add_compile_flags_if_supported(-EHs- -EHa-)
> > > > > > > > + add_compile_flags_if_supported(-fno-exceptions)
> > > > > > > > endif()
> > > > > > > > -# RTTI
> > > > > > > > +
> > > > > > > > +# RTTI flags
> > > > > > > > ==================================================================
> > > > > > > > if (NOT LIBCXX_ENABLE_RTTI)
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS -D_LIBCPP_NO_RTTI)
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_NO_GR_FLAG -GR-)
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_FNO_RTTI_FLAG -fno-rtti)
> > > > > > > > + add_definitions(-D_LIBCPP_NO_RTTI)
> > > > > > > > + add_compile_flags_if_supported(-GR-)
> > > > > > > > + add_compile_flags_if_supported(-fno-rtti)
> > > > > > > > endif()
> > > > > > > > -# Assert
> > > > > > > > -string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
> > > > > > > > +
> > > > > > > > +# Assertion flags
> > > > > > > > =============================================================
> > > > > > > > +define_if(LIBCXX_ENABLE_ASSERTIONS -UNDEBUG)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_ASSERTIONS -DNDEBUG)
> > > > > > > > if (LIBCXX_ENABLE_ASSERTIONS)
> > > > > > > > # MSVC doesn't like _DEBUG on release builds. See PR 4379.
> > > > > > > > - if (NOT MSVC)
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS -D_DEBUG)
> > > > > > > > - endif()
> > > > > > > > - # On Release builds cmake automatically defines NDEBUG, so we
> > > > > > > > - # explicitly undefine it:
> > > > > > > > - if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS -UNDEBUG)
> > > > > > > > - endif()
> > > > > > > > -else()
> > > > > > > > - if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS -DNDEBUG)
> > > > > > > > - endif()
> > > > > > > > -endif()
> > > > > > > > -# Static library
> > > > > > > > -if (NOT LIBCXX_ENABLE_SHARED)
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS -D_LIBCPP_BUILD_STATIC)
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)
> > > > > > > > - if (LIBCXX_BUILD_32_BITS)
> > > > > > > > - message(STATUS "Building 32 bits executables and libraries.")
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS "-m32")
> > > > > > > > - endif()
> > > > > > > > -elseif(LIBCXX_BUILD_32_BITS)
> > > > > > > > - message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported
> on
> > > > > > > > this
> > > > > > > > platform.")
> > > > > > > > -endif()
> > > > > > > > -# This is the _ONLY_ place where add_definitions is called.
> > > > > > > > -if (MSVC)
> > > > > > > > - add_definitions(-D_CRT_SECURE_NO_WARNINGS)
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -# LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE configuration
> > > > > > > > -if (NOT LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE)
> > > > > > > > - add_definitions(-D_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE)
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -# LIBCXX_ENABLE_STDIN configuration
> > > > > > > > -if (NOT LIBCXX_ENABLE_STDIN)
> > > > > > > > - add_definitions(-D_LIBCPP_HAS_NO_STDIN)
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -# LIBCXX_ENABLE_STDOUT configuration
> > > > > > > > -if (NOT LIBCXX_ENABLE_STDOUT)
> > > > > > > > - add_definitions(-D_LIBCPP_HAS_NO_STDOUT)
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -# LIBCXX_ENABLE_THREADS configuration
> > > > > > > > -if (NOT LIBCXX_ENABLE_THREADS)
> > > > > > > > - add_definitions(-D_LIBCPP_HAS_NO_THREADS)
> > > > > > > > - if (NOT LIBCXX_ENABLE_MONOTONIC_CLOCK)
> > > > > > > > - add_definitions(-D_LIBCPP_HAS_NO_MONOTONIC_CLOCK)
> > > > > > > > - endif()
> > > > > > > > -# Ensure LIBCXX_ENABLE_MONOTONIC_CLOCK is set to ON.
> > > > > > > > -elseif(NOT LIBCXX_ENABLE_MONOTONIC_CLOCK)
> > > > > > > > - message(FATAL_ERROR "LIBCXX_ENABLE_MONOTONIC_CLOCK can only be
> > > > > > > > set to
> > > > > > > > OFF"
> > > > > > > > - " when LIBCXX_ENABLE_THREADS is also set to
> > > > > > > > OFF.")
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -# LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS configuration
> > > > > > > > -if (NOT LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS)
> > > > > > > > - add_definitions(-D_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS)
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -# Configure for sanitizers. If LIBCXX_BUILT_STANDALONE then we
> have
> > > > > > > > to do
> > > > > > > > -# the flag translation ourselves. Othewise LLVM's CMakeList.txt
> > > > > > > > will
> > > > > > > > handle it.
> > > > > > > > -if (LIBCXX_BUILT_STANDALONE)
> > > > > > > > - # NOTE: LLVM_USE_SANITIZER checks for a UNIX like system
> instead
> > > > > > > > of
> > > > > > > > MSVC.
> > > > > > > > - # But we don't have LLVM_ON_UNIX so checking for MSVC is the
> best
> > > > > > > > we
> > > > > > > > can do.
> > > > > > > > - if (LLVM_USE_SANITIZER AND NOT MSVC)
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS
> > > > > > > > LIBCXX_HAS_FNO_OMIT_FRAME_POINTER_FLAG
> > > > > > > > - "-fno-omit-frame-pointer")
> > > > > > > > - if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND
> > > > > > > > - NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
> > > > > > > > - append_if(LIBCXX_CXX_FLAGS
> LIBCXX_HAS_GLINE_TABLES_ONLY_FLAG
> > > > > > > > - "-gline-tables-only")
> > > > > > > > - endif()
> > > > > > > > - if (LLVM_USE_SANITIZER STREQUAL "Address")
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=address")
> > > > > > > > - elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=memory")
> > > > > > > > - if (LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS
> > > > > > > > "-fsanitize-memory-track-origins")
> > > > > > > > - endif()
> > > > > > > > - elseif (LLVM_USE_SANITIZER STREQUAL "Undefined")
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS
> > > > > > > > - "-fsanitize=undefined -fno-sanitize=vptr,function
> > > > > > > > -fno-sanitize-recover")
> > > > > > > > - elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
> > > > > > > > - list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=thread")
> > > > > > > > - else()
> > > > > > > > - message(WARNING "Unsupported value of LLVM_USE_SANITIZER:
> > > > > > > > ${LLVM_USE_SANITIZER}")
> > > > > > > > - endif()
> > > > > > > > - elseif(MSVC)
> > > > > > > > - message(WARNING "LLVM_USE_SANITIZER is not supported with
> > > > > > > > MSVC")
> > > > > > > > - endif()
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -append_if(LIBCXX_CXX_FLAGS LIBCXX_TARGET_TRIPLE
> > > > > > > > - "-target ${LIBCXX_TARGET_TRIPLE}")
> > > > > > > > -
> > > > > > > > -append_if(LIBCXX_CXX_FLAGS LIBCXX_SYSROOT "--sysroot
> > > > > > > > ${LIBCXX_SYSROOT}")
> > > > > > > > -append_if(LIBCXX_CXX_FLAGS LIBCXX_GCC_TOOLCHAIN
> > > > > > > > - "-gcc-toolchain ${LIBCXX_GCC_TOOLCHAIN}")
> > > > > > > > -
> > > > > > > > -if (LLVM_USE_SANITIZER AND LIBCXX_GENERATE_COVERAGE)
> > > > > > > > - message(FATAL_ERROR "LLVM_USE_SANITIZER cannot be used with
> > > > > > > > LIBCXX_GENERATE_COVERAGE")
> > > > > > > > + define_if_not(MSVC -D_DEBUG)
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > -string(REPLACE ";" " " LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS}")
> > > > > > > > -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_FLAGS}")
> > > > > > > > +# Feature flags
> > > > > > > > ===============================================================
> > > > > > > > +define_if(MSVC -D_CRT_SECURE_NO_WARNINGS)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE
> > > > > > > > -D_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_STDIN -D_LIBCPP_HAS_NO_STDIN)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_STDOUT -D_LIBCPP_HAS_NO_STDOUT)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_THREADS -D_LIBCPP_HAS_NO_THREADS)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_MONOTONIC_CLOCK
> > > > > > > > -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK)
> > > > > > > > +define_if_not(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS
> > > > > > > > -D_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS)
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > -# Setup Source Code
> > > > > > > > +# Setup Source Code And Tests
> > > > > > > >
> > > > > > > >
> > > > > > > >
> #===============================================================================
> > > > > > > > -
> > > > > > > > include_directories(include)
> > > > > > > > add_subdirectory(include)
> > > > > > > > -
> > > > > > > > -# Add source code. This also contains all of the logic for
> deciding
> > > > > > > > linker flags
> > > > > > > > -# soname, etc...
> > > > > > > > add_subdirectory(lib)
> > > > > > > > -
> > > > > > > >
> > > > > > > >
> > > > > > > >
> -#===============================================================================
> > > > > > > > -# Setup Tests
> > > > > > > >
> > > > > > > >
> > > > > > > >
> -#===============================================================================
> > > > > > > > -
> > > > > > > > add_subdirectory(test)
> > > > > > > >
> > > > > > > > Added: libcxx/trunk/cmake/Modules/FindLLVM.cmake
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/FindLLVM.cmake?rev=243574&view=auto
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/cmake/Modules/FindLLVM.cmake (added)
> > > > > > > > +++ libcxx/trunk/cmake/Modules/FindLLVM.cmake Wed Jul 29 16:07:28
> > > > > > > > 2015
> > > > > > > > @@ -0,0 +1,81 @@
> > > > > > > > +
> > > > > > > > +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
> > > > > > > > + # Rely on llvm-config.
> > > > > > > > + set(CONFIG_OUTPUT)
> > > > > > > > + find_program(LLVM_CONFIG "llvm-config")
> > > > > > > > + if(DEFINED LLVM_PATH)
> > > > > > > > + set(LLVM_INCLUDE_DIR ${LLVM_INCLUDE_DIR} CACHE PATH "Path to
> > > > > > > > llvm/include")
> > > > > > > > + set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source
> > > > > > > > tree")
> > > > > > > > + set(LLVM_MAIN_SRC_DIR ${LLVM_PATH})
> > > > > > > > + set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules")
> > > > > > > > + elseif(LLVM_CONFIG)
> > > > > > > > + message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
> > > > > > > > + set(CONFIG_COMMAND ${LLVM_CONFIG}
> > > > > > > > + "--includedir"
> > > > > > > > + "--prefix"
> > > > > > > > + "--src-root")
> > > > > > > > + execute_process(
> > > > > > > > + COMMAND ${CONFIG_COMMAND}
> > > > > > > > + RESULT_VARIABLE HAD_ERROR
> > > > > > > > + OUTPUT_VARIABLE CONFIG_OUTPUT
> > > > > > > > + )
> > > > > > > > + if(NOT HAD_ERROR)
> > > > > > > > + string(REGEX REPLACE
> > > > > > > > + "[ \t]*[\r\n]+[ \t]*" ";"
> > > > > > > > + CONFIG_OUTPUT ${CONFIG_OUTPUT})
> > > > > > > > + else()
> > > > > > > > + string(REPLACE ";" " " CONFIG_COMMAND_STR
> > > > > > > > "${CONFIG_COMMAND}")
> > > > > > > > + message(STATUS "${CONFIG_COMMAND_STR}")
> > > > > > > > + message(FATAL_ERROR "llvm-config failed with status
> > > > > > > > ${HAD_ERROR}")
> > > > > > > > + endif()
> > > > > > > > +
> > > > > > > > + list(GET CONFIG_OUTPUT 0 INCLUDE_DIR)
> > > > > > > > + list(GET CONFIG_OUTPUT 1 LLVM_OBJ_ROOT)
> > > > > > > > + list(GET CONFIG_OUTPUT 2 MAIN_SRC_DIR)
> > > > > > > > +
> > > > > > > > + set(LLVM_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to
> > > > > > > > llvm/include")
> > > > > > > > + set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM
> > > > > > > > build
> > > > > > > > tree")
> > > > > > > > + set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to
> LLVM
> > > > > > > > source
> > > > > > > > tree")
> > > > > > > > + set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/share/llvm/cmake")
> > > > > > > > + else()
> > > > > > > > + message(FATAL_ERROR "llvm-config not found and
> > > > > > > > LLVM_MAIN_SRC_DIR not
> > > > > > > > defined. "
> > > > > > > > + "Reconfigure with
> > > > > > > > -DLLVM_CONFIG=path/to/llvm-config "
> > > > > > > > + "or
> -DLLVM_PATH=path/to/llvm-source-root.")
> > > > > > > > + endif()
> > > > > > > > +
> > > > > > > > + if (NOT EXISTS ${LLVM_MAIN_SRC_DIR})
> > > > > > > > + message(FATAL_ERROR "Not found: ${LLVM_MAIN_SRC_DIR}")
> > > > > > > > + endif()
> > > > > > > > +
> > > > > > > > + if(NOT EXISTS ${LLVM_CMAKE_PATH})
> > > > > > > > + message(FATAL_ERROR "Not found: ${LLVM_CMAKE_PATH}")
> > > > > > > > + endif()
> > > > > > > > +
> > > > > > > > + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
> > > > > > > > + list(APPEND CMAKE_MODULE_PATH
> > > > > > > > "${LLVM_MAIN_SRC_DIR}/cmake/modules")
> > > > > > > > +
> > > > > > > > +
> > > > > > > > + if(LLVM_LIT)
> > > > > > > > + # Define the default arguments to use with 'lit', and an
> option
> > > > > > > > for
> > > > > > > > the user
> > > > > > > > + # to override.
> > > > > > > > + set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
> > > > > > > > + if (MSVC OR XCODE)
> > > > > > > > + set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT}
> --no-progress-bar")
> > > > > > > > + endif()
> > > > > > > > + set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default
> > > > > > > > options
> > > > > > > > for lit")
> > > > > > > > +
> > > > > > > > + # On Win32 hosts, provide an option to specify the path to
> the
> > > > > > > > GnuWin32 tools.
> > > > > > > > + if( WIN32 AND NOT CYGWIN )
> > > > > > > > + set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32
> > > > > > > > tools")
> > > > > > > > + endif()
> > > > > > > > + else()
> > > > > > > > + set(LLVM_INCLUDE_TESTS OFF)
> > > > > > > > + endif()
> > > > > > > > +
> > > > > > > > + include(AddLLVM) # Include the LLVM CMake functions.
> > > > > > > > + include(HandleLLVMOptions)
> > > > > > > > + set(LIBCXX_BUILT_STANDALONE 1)
> > > > > > > > +else()
> > > > > > > > + set(LLVM_MAIN_SRC_DIR "${CMAKE_SOURCE_DIR}" CACHE PATH "Path to
> > > > > > > > LLVM
> > > > > > > > source tree")
> > > > > > > > + set(LLVM_LIT "${CMAKE_SOURCE_DIR}/utils/lit/lit.py")
> > > > > > > > +endif()
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake (original)
> > > > > > > > +++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Wed Jul 29
> > > > > > > > 16:07:28
> > > > > > > > 2015
> > > > > > > > @@ -58,6 +58,21 @@ macro(setup_abi_lib abidefines abilib ab
> > > > > > > >
> > > > > > > > endmacro()
> > > > > > > >
> > > > > > > > +# Setup the default options if LIBCXX_CXX_ABI is not specified.
> > > > > > > > +if (NOT LIBCXX_CXX_ABI)
> > > > > > > > + if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
> > > > > > > > + IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
> > > > > > > > + set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
> > > > > > > > + set(LIBCXX_CXX_ABI_INCLUDE_PATHS
> > > > > > > > "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
> > > > > > > > + set(LIBCXX_CXX_ABI_INTREE 1)
> > > > > > > > + else ()
> > > > > > > > + set(LIBCXX_CXX_ABI_LIBNAME "none")
> > > > > > > > + endif ()
> > > > > > > > +else ()
> > > > > > > > + set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
> > > > > > > > +endif ()
> > > > > > > > +
> > > > > > > > +# Configure based on the selected ABI library.
> > > > > > > > if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
> > > > > > > > "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++")
> > > > > > > > set(_LIBSUPCXX_INCLUDE_FILES
> > > > > > > >
> > > > > > > > Added: libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake?rev=243574&view=auto
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake (added)
> > > > > > > > +++ libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake Wed Jul 29
> > > > > > > > 16:07:28
> > > > > > > > 2015
> > > > > > > > @@ -0,0 +1,147 @@
> > > > > > > > +# HandleLibcxxFlags - A set of macros used to setup the flags
> used
> > > > > > > > to
> > > > > > > > compile
> > > > > > > > +# and link libc++. These macros add flags to the following CMake
> > > > > > > > variables.
> > > > > > > > +# - LIBCXX_COMPILE_FLAGS: flags used to compile libc++
> > > > > > > > +# - LIBCXX_LINK_FLAGS: flags used to link libc++
> > > > > > > > +# - LIBCXX_LIBRARIES: libraries to link libc++ to.
> > > > > > > > +
> > > > > > > > +include(CheckCXXCompilerFlag)
> > > > > > > > +
> > > > > > > > +unset(add_flag_if_supported)
> > > > > > > > +
> > > > > > > > +# Mangle the name of a compiler flag into a valid CMake
> identifier.
> > > > > > > > +# Ex: --std=c++11 -> STD_EQ_CXX11
> > > > > > > > +macro(mangle_name str output)
> > > > > > > > + string(STRIP "${str}" strippedStr)
> > > > > > > > + string(REGEX REPLACE "^/" "" strippedStr "${strippedStr}")
> > > > > > > > + string(REGEX REPLACE "^-+" "" strippedStr "${strippedStr}")
> > > > > > > > + string(REGEX REPLACE "-+$" "" strippedStr "${strippedStr}")
> > > > > > > > + string(REPLACE "-" "_" strippedStr "${strippedStr}")
> > > > > > > > + string(REPLACE "=" "_EQ_" strippedStr "${strippedStr}")
> > > > > > > > + string(REPLACE "+" "X" strippedStr "${strippedStr}")
> > > > > > > > + string(TOUPPER "${strippedStr}" ${output})
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Remove a list of flags from all CMake variables that affect
> > > > > > > > compile
> > > > > > > > flags.
> > > > > > > > +# This can be used to remove unwanted flags specified on the
> > > > > > > > command line
> > > > > > > > +# or added in other parts of LLVM's cmake configuration.
> > > > > > > > +macro(remove_flags)
> > > > > > > > + foreach(var ${ARGN})
> > > > > > > > + string(REPLACE "${var}" "" CMAKE_CXX_FLAGS
> > > > > > > > "${CMAKE_CXX_FLAGS}")
> > > > > > > > + string(REPLACE "${var}" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
> > > > > > > > + string(REPLACE "${var}" "" CMAKE_EXE_LINKER_FLAGS
> > > > > > > > "${CMAKE_EXE_LINKER_FLAGS}")
> > > > > > > > + string(REPLACE "${var}" "" CMAKE_SHARED_LINKER_FLAGS
> > > > > > > > "${CMAKE_SHARED_LINKER_FLAGS}")
> > > > > > > > + string(REPLACE "${var}" "" CMAKE_SHARED_MODULE_FLAGS
> > > > > > > > "${CMAKE_SHARED_MODULE_FLAGS}")
> > > > > > > > + remove_definitions(${var})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro(remove_flags)
> > > > > > > > +
> > > > > > > > +# Add a macro definition if condition is true.
> > > > > > > > +macro(define_if condition def)
> > > > > > > > + if (${condition})
> > > > > > > > + add_definitions(${def})
> > > > > > > > + endif()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Add a macro definition if condition is not true.
> > > > > > > > +macro(define_if_not condition def)
> > > > > > > > + if (NOT ${condition})
> > > > > > > > + add_definitions(${def})
> > > > > > > > + endif()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Add a specified list of flags to both 'LIBCXX_COMPILE_FLAGS'
> and
> > > > > > > > +# 'LIBCXX_LINK_FLAGS'.
> > > > > > > > +macro(add_flags)
> > > > > > > > + foreach(value ${ARGN})
> > > > > > > > + list(APPEND LIBCXX_COMPILE_FLAGS ${value})
> > > > > > > > + list(APPEND LIBCXX_LINK_FLAGS ${value})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# If the specified 'condition' is true then add a list of flags
> to
> > > > > > > > both
> > > > > > > > +# 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS'.
> > > > > > > > +macro(add_flags_if condition)
> > > > > > > > + if (${condition})
> > > > > > > > + add_flags(${ARGN})
> > > > > > > > + endif()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Add each flag in the list to LIBCXX_COMPILE_FLAGS and
> > > > > > > > LIBCXX_LINK_FLAGS
> > > > > > > > +# if that flag is supported by the current compiler.
> > > > > > > > +macro(add_flags_if_supported)
> > > > > > > > + foreach(flag ${ARGN})
> > > > > > > > + mangle_name("${flag}" flagname)
> > > > > > > > + check_cxx_compiler_flag("${flag}"
> > > > > > > > "LIBCXX_SUPPORTS_${flagname}_FLAG")
> > > > > > > > + add_flags_if(LIBCXX_SUPPORTS_${flagname}_FLAG ${flag})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Add a list of flags to 'LIBCXX_COMPILE_FLAGS'.
> > > > > > > > +macro(add_compile_flags)
> > > > > > > > + foreach(f ${ARGN})
> > > > > > > > + list(APPEND LIBCXX_COMPILE_FLAGS ${f})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# If 'condition' is true then add the specified list of flags to
> > > > > > > > +# 'LIBCXX_COMPILE_FLAGS'
> > > > > > > > +macro(add_compile_flags_if condition)
> > > > > > > > + if (${condition})
> > > > > > > > + add_compile_flags(${ARGN})
> > > > > > > > + endif()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# For each specified flag, add that flag to
> 'LIBCXX_COMPILE_FLAGS'
> > > > > > > > if the
> > > > > > > > +# flag is supported by the C++ compiler.
> > > > > > > > +macro(add_compile_flags_if_supported)
> > > > > > > > + foreach(flag ${ARGN})
> > > > > > > > + mangle_name("${flag}" flagname)
> > > > > > > > + check_cxx_compiler_flag("-Werror ${flag}"
> > > > > > > > "LIBCXX_SUPPORTS_${flagname}_FLAG")
> > > > > > > > + add_compile_flags_if(LIBCXX_SUPPORTS_${flagname}_FLAG
> > > > > > > > ${flag})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Add a list of flags to 'LIBCXX_LINK_FLAGS'.
> > > > > > > > +macro(add_link_flags)
> > > > > > > > + foreach(f ${ARGN})
> > > > > > > > + list(APPEND LIBCXX_LINK_FLAGS ${f})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# If 'condition' is true then add the specified list of flags to
> > > > > > > > +# 'LIBCXX_LINK_FLAGS'
> > > > > > > > +macro(add_link_flags_if condition)
> > > > > > > > + if (${condition})
> > > > > > > > + add_link_flags(${ARGN})
> > > > > > > > + endif()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# For each specified flag, add that flag to 'LIBCXX_LINK_FLAGS'
> if
> > > > > > > > the
> > > > > > > > +# flag is supported by the C++ compiler.
> > > > > > > > +macro(add_link_flags_if_supported)
> > > > > > > > + foreach(flag ${ARGN})
> > > > > > > > + mangle_name("${flag}" flagname)
> > > > > > > > + check_cxx_compiler_flag("${flag}"
> > > > > > > > "LIBCXX_SUPPORTS_${flagname}_FLAG")
> > > > > > > > + add_link_flags_if(LIBCXX_SUPPORTS_${flagname}_FLAG ${flag})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Add a list of libraries or link flags to 'LIBCXX_LIBRARIES'.
> > > > > > > > +macro(add_library_flags)
> > > > > > > > + foreach(lib ${ARGN})
> > > > > > > > + list(APPEND LIBCXX_LIBRARIES ${lib})
> > > > > > > > + endforeach()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# if 'condition' is true then add the specified list of libraries
> > > > > > > > and
> > > > > > > > flags
> > > > > > > > +# to 'LIBCXX_LIBRARIES'.
> > > > > > > > +macro(add_library_flags_if condition)
> > > > > > > > + if(${condition})
> > > > > > > > + add_library_flags(${ARGN})
> > > > > > > > + endif()
> > > > > > > > +endmacro()
> > > > > > > > +
> > > > > > > > +# Turn a comma separated CMake list into a space separated
> string.
> > > > > > > > +macro(split_list listname)
> > > > > > > > + string(REPLACE ";" " " ${listname} "${${listname}}")
> > > > > > > > +endmacro()
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/cmake/config-ix.cmake
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/config-ix.cmake?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/cmake/config-ix.cmake (original)
> > > > > > > > +++ libcxx/trunk/cmake/config-ix.cmake Wed Jul 29 16:07:28 2015
> > > > > > > > @@ -2,23 +2,7 @@ include(CheckLibraryExists)
> > > > > > > > include(CheckCXXCompilerFlag)
> > > > > > > >
> > > > > > > > # Check compiler flags
> > > > > > > > -check_cxx_compiler_flag(-std=c++11
> > > > > > > > LIBCXX_HAS_STDCXX11_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-std=c++1y
> > > > > > > > LIBCXX_HAS_STDCXX1Y_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-fPIC
> > > > > > > > LIBCXX_HAS_FPIC_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-fno-omit-frame-pointer
> > > > > > > > LIBCXX_HAS_FNO_OMIT_FRAME_POINTER_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-nodefaultlibs
> > > > > > > > LIBCXX_HAS_NODEFAULTLIBS_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-nostdinc++
> > > > > > > > LIBCXX_HAS_NOSTDINCXX_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-Wall
> > > > > > > > LIBCXX_HAS_WALL_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-W
> LIBCXX_HAS_W_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-Wno-unused-parameter
> > > > > > > > LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-Wwrite-strings
> > > > > > > > LIBCXX_HAS_WWRITE_STRINGS_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-Wno-long-long
> > > > > > > > LIBCXX_HAS_WNO_LONG_LONG_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-pedantic
> > > > > > > > LIBCXX_HAS_PEDANTIC_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-Werror
> > > > > > > > LIBCXX_HAS_WERROR_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-Wno-error
> > > > > > > > LIBCXX_HAS_WNO_ERROR_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-fno-exceptions
> > > > > > > > LIBCXX_HAS_FNO_EXCEPTIONS_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-fno-rtti
> > > > > > > > LIBCXX_HAS_FNO_RTTI_FLAG)
> > > > > > > > -check_cxx_compiler_flag(-gline-tables-only
> > > > > > > > LIBCXX_HAS_GLINE_TABLES_ONLY_FLAG)
> > > > > > > > +
> > > > > > > > check_cxx_compiler_flag(/WX
> LIBCXX_HAS_WX_FLAG)
> > > > > > > > check_cxx_compiler_flag(/WX-
> > > > > > > > LIBCXX_HAS_NO_WX_FLAG)
> > > > > > > > check_cxx_compiler_flag(/EHsc
> > > > > > > > LIBCXX_HAS_EHSC_FLAG)
> > > > > > > > @@ -26,6 +10,7 @@ check_cxx_compiler_flag(/EHs-
> > > > > > > > check_cxx_compiler_flag(/EHa-
> > > > > > > > LIBCXX_HAS_NO_EHA_FLAG)
> > > > > > > > check_cxx_compiler_flag(/GR-
> > > > > > > > LIBCXX_HAS_NO_GR_FLAG)
> > > > > > > >
> > > > > > > > +
> > > > > > > > # Check libraries
> > > > > > > > check_library_exists(pthread pthread_create ""
> > > > > > > > LIBCXX_HAS_PTHREAD_LIB)
> > > > > > > > check_library_exists(c printf "" LIBCXX_HAS_C_LIB)
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/lib/CMakeLists.txt
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/lib/CMakeLists.txt (original)
> > > > > > > > +++ libcxx/trunk/lib/CMakeLists.txt Wed Jul 29 16:07:28 2015
> > > > > > > > @@ -25,48 +25,23 @@ if (MSVC_IDE OR XCODE)
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > if (LIBCXX_ENABLE_SHARED)
> > > > > > > > - add_library(cxx SHARED
> > > > > > > > - ${LIBCXX_SOURCES}
> > > > > > > > - ${LIBCXX_HEADERS}
> > > > > > > > - )
> > > > > > > > + add_library(cxx SHARED ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
> > > > > > > > else()
> > > > > > > > - add_library(cxx STATIC
> > > > > > > > - ${LIBCXX_SOURCES}
> > > > > > > > - ${LIBCXX_HEADERS}
> > > > > > > > - )
> > > > > > > > -endif()
> > > > > > > > -
> > > > > > > > -#if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to
> the
> > > > > > > > search path.
> > > > > > > > -if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH)
> > > > > > > > - target_link_libraries(cxx "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
> > > > > > > > + add_library(cxx STATIC ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > if (DEFINED LIBCXX_CXX_ABI_DEPS)
> > > > > > > > add_dependencies(cxx LIBCXX_CXX_ABI_DEPS)
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > -set(libraries "")
> > > > > > > > -if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
> > > > > > > > - # TODO(ericwf): Remove these GNU specific linker flags and
> let
> > > > > > > > CMake
> > > > > > > > do the
> > > > > > > > - # configuration. This will be more portable.
> > > > > > > > - list(APPEND libraries "-Wl,--whole-archive" "-Wl,-Bstatic")
> > > > > > > > - list(APPEND libraries "${LIBCXX_CXX_ABI_LIBRARY}")
> > > > > > > > - list(APPEND libraries "-Wl,-Bdynamic"
> "-Wl,--no-whole-archive")
> > > > > > > > -else()
> > > > > > > > - list(APPEND libraries "${LIBCXX_CXX_ABI_LIBRARY}")
> > > > > > > > -endif()
> > > > > > > > +#if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to
> the
> > > > > > > > search path.
> > > > > > > > +add_link_flags_if(LIBCXX_CXX_ABI_LIBRARY_PATH
> > > > > > > > "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
> > > > > > > >
> > > > > > > > -# Generate library list.
> > > > > > > > -append_if(libraries LIBCXX_HAS_PTHREAD_LIB pthread)
> > > > > > > > -append_if(libraries LIBCXX_HAS_C_LIB c)
> > > > > > > > -append_if(libraries LIBCXX_HAS_M_LIB m)
> > > > > > > > -append_if(libraries LIBCXX_HAS_RT_LIB rt)
> > > > > > > > -append_if(libraries LIBCXX_HAS_GCC_S_LIB gcc_s)
> > > > > > > > +add_library_flags_if(LIBCXX_COVERAGE_LIBRARY
> > > > > > > > "${LIBCXX_COVERAGE_LIBRARY}")
> > > > > > > >
> > > > > > > > -if (LIBCXX_COVERAGE_LIBRARY)
> > > > > > > > - target_link_libraries(cxx ${LIBCXX_COVERAGE_LIBRARY})
> > > > > > > > -endif()
> > > > > > > > -target_link_libraries(cxx ${libraries})
> > > > > > > > +add_library_flags_if(LIBCXX_ENABLE_STATIC_ABI_LIBRARY
> > > > > > > > "-Wl,--whole-archive" "-Wl,-Bstatic")
> > > > > > > > +add_library_flags("${LIBCXX_CXX_ABI_LIBRARY}")
> > > > > > > > +add_library_flags_if(LIBCXX_ENABLE_STATIC_ABI_LIBRARY
> > > > > > > > "-Wl,-Bdynamic"
> > > > > > > > "-Wl,--no-whole-archive")
> > > > > > > >
> > > > > > > > if (APPLE AND LLVM_USE_SANITIZER)
> > > > > > > > if ("${LLVM_USE_SANITIZER}" STREQUAL "Address")
> > > > > > > > @@ -89,15 +64,21 @@ if (APPLE AND LLVM_USE_SANITIZER)
> > > > > > > > set(LIBCXX_SANITIZER_LIBRARY "${LIBDIR}/${LIBFILE}")
> > > > > > > > set(LIBCXX_SANITIZER_LIBRARY "${LIBCXX_SANITIZER_LIBRARY}"
> > > > > > > > PARENT_SCOPE)
> > > > > > > > message(STATUS "Manually linking compiler-rt library:
> > > > > > > > ${LIBCXX_SANITIZER_LIBRARY}")
> > > > > > > > - target_link_libraries(cxx "${LIBCXX_SANITIZER_LIBRARY}")
> > > > > > > > - target_link_libraries(cxx "-Wl,-rpath,${LIBDIR}")
> > > > > > > > + add_library_flags("${LIBCXX_SANITIZER_LIBRARY}")
> > > > > > > > + add_link_flags("-Wl,-rpath,${LIBDIR}")
> > > > > > > > endif()
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > +# Generate library list.
> > > > > > > > +add_library_flags_if(LIBCXX_HAS_PTHREAD_LIB pthread)
> > > > > > > > +add_library_flags_if(LIBCXX_HAS_C_LIB c)
> > > > > > > > +add_library_flags_if(LIBCXX_HAS_M_LIB m)
> > > > > > > > +add_library_flags_if(LIBCXX_HAS_RT_LIB rt)
> > > > > > > > +add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s)
> > > > > > > >
> > > > > > > > # Setup flags.
> > > > > > > > -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC)
> > > > > > > > -append_if(LIBCXX_LINK_FLAGS LIBCXX_HAS_NODEFAULTLIBS_FLAG
> > > > > > > > -nodefaultlibs)
> > > > > > > > +add_flags_if_supported(-fPIC)
> > > > > > > > +add_link_flags_if_supported(-nodefaultlibs)
> > > > > > > >
> > > > > > > > if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR
> > > > > > > > LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"))
> > > > > > > > @@ -106,8 +87,8 @@ if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME S
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
> > > > > > > > - list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")
> > > > > > > > - list(APPEND LIBCXX_LINK_FLAGS
> > > > > > > > + add_definitions(-D__STRICT_ANSI__)
> > > > > > > > + add_link_flags(
> > > > > > > > "-compatibility_version 1"
> > > > > > > > "-current_version 1"
> > > > > > > > "-install_name /usr/lib/libc++.1.dylib"
> > > > > > > > @@ -129,7 +110,7 @@ if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME S
> > > > > > > > set (OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib
> > > > > > > >
> > > > > > > >
> -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > - list(APPEND LIBCXX_LINK_FLAGS
> > > > > > > > + add_link_flags(
> > > > > > > > "-compatibility_version 1"
> > > > > > > > "-install_name /usr/lib/libc++.1.dylib"
> > > > > > > >
> > > > > > > >
> > > > > > > >
> "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
> > > > > > > > @@ -139,8 +120,9 @@ if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME S
> > > > > > > > endif()
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > -string(REPLACE ";" " " LIBCXX_COMPILE_FLAGS
> > > > > > > > "${LIBCXX_COMPILE_FLAGS}")
> > > > > > > > -string(REPLACE ";" " " LIBCXX_LINK_FLAGS "${LIBCXX_LINK_FLAGS}")
> > > > > > > > +target_link_libraries(cxx ${LIBCXX_LIBRARIES})
> > > > > > > > +split_list(LIBCXX_COMPILE_FLAGS)
> > > > > > > > +split_list(LIBCXX_LINK_FLAGS)
> > > > > > > >
> > > > > > > > set_target_properties(cxx
> > > > > > > > PROPERTIES
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/test/CMakeLists.txt
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/CMakeLists.txt?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/test/CMakeLists.txt (original)
> > > > > > > > +++ libcxx/trunk/test/CMakeLists.txt Wed Jul 29 16:07:28 2015
> > > > > > > > @@ -6,84 +6,47 @@ macro(pythonize_bool var)
> > > > > > > > endif()
> > > > > > > > endmacro()
> > > > > > > >
> > > > > > > > -set(LIT_EXECUTABLE "" CACHE FILEPATH "Path to LLVM's llvm-lit.")
> > > > > > > > +set(LIBCXX_LIT_VARIANT "libcxx" CACHE STRING
> > > > > > > > + "Configuration variant to use for LIT.")
> > > > > > > >
> > > > > > > > -if(LIBCXX_BUILT_STANDALONE)
> > > > > > > > - # Make sure we can use the console pool for recent cmake and
> > > > > > > > ninja >
> > > > > > > > 1.5
> > > > > > > > - if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
> > > > > > > > - set(cmake_3_2_USES_TERMINAL)
> > > > > > > > - else()
> > > > > > > > - set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
> > > > > > > > - endif()
> > > > > > > > -else()
> > > > > > > > - include(FindPythonInterp)
> > > > > > > > - if(PYTHONINTERP_FOUND)
> > > > > > > > - set(LIT_EXECUTABLE
> > > > > > > > - ${PYTHON_EXECUTABLE}
> ${CMAKE_SOURCE_DIR}/utils/lit/lit.py)
> > > > > > > > - else()
> > > > > > > > - message(WARNING "Could not find Python, cannot set
> > > > > > > > LIT_EXECUTABLE.")
> > > > > > > > - endif()
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_RTTI)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_SHARED)
> > > > > > > > +pythonize_bool(LIBCXX_BUILD_32_BITS)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_STDIN)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_STDOUT)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_THREADS)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS)
> > > > > > > > +pythonize_bool(LIBCXX_ENABLE_MONOTONIC_CLOCK)
> > > > > > > > +pythonize_bool(LIBCXX_GENERATE_COVERAGE)
> > > > > > > > +pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
> > > > > > > > +
> > > > > > > > +# The tests shouldn't link to any ABI library when it has been
> > > > > > > > linked
> > > > > > > > into
> > > > > > > > +# libc++ statically.
> > > > > > > > +if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
> > > > > > > > + set(LIBCXX_CXX_ABI_LIBNAME "none")
> > > > > > > > endif()
> > > > > > > > -
> > > > > > > > -if (LIT_EXECUTABLE)
> > > > > > > > - set(LIT_ARGS_DEFAULT "-sv --show-unsupported --show-xfail")
> > > > > > > > - if (MSVC OR XCODE)
> > > > > > > > - set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
> > > > > > > > - endif()
> > > > > > > > - set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"
> > > > > > > > - CACHE STRING "Default options for lit")
> > > > > > > > - set(LIT_ARGS "${LLVM_LIT_ARGS}")
> > > > > > > > - separate_arguments(LIT_ARGS)
> > > > > > > > -
> > > > > > > > - set(LIBCXX_LIT_VARIANT "libcxx" CACHE STRING
> > > > > > > > - "Configuration variant to use for LIT.")
> > > > > > > > -
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_RTTI)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_SHARED)
> > > > > > > > - pythonize_bool(LIBCXX_BUILD_32_BITS)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_STDIN)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_STDOUT)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_THREADS)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS)
> > > > > > > > - pythonize_bool(LIBCXX_ENABLE_MONOTONIC_CLOCK)
> > > > > > > > - pythonize_bool(LIBCXX_GENERATE_COVERAGE)
> > > > > > > > - pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
> > > > > > > > -
> > > > > > > > - # The tests shouldn't link to any ABI library when it has been
> > > > > > > > linked
> > > > > > > > into
> > > > > > > > - # libc++ statically.
> > > > > > > > - if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
> > > > > > > > - set(LIBCXX_CXX_ABI_LIBNAME "none")
> > > > > > > > - endif()
> > > > > > > > - set(LIBCXX_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE
> > > > > > > > STRING
> > > > > > > > - "TargetInfo to use when setting up test environment.")
> > > > > > > > - set(LIBCXX_EXECUTOR "None" CACHE STRING
> > > > > > > > - "Executor to use when running tests.")
> > > > > > > > -
> > > > > > > > - set(AUTO_GEN_COMMENT "## Autogenerated by libcxx
> > > > > > > > configuration.\n# Do
> > > > > > > > not edit!")
> > > > > > > > -
> > > > > > > > - configure_file(
> > > > > > > > - ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> > > > > >
> > > > > > > >
> > > > > > > > - ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
> > > > > > > > - @ONLY)
> > > > > > > > -
> > > > > > > > - add_custom_target(check-libcxx
> > > > > > > > - COMMAND ${LIT_EXECUTABLE}
> > > > > > > > - ${LIT_ARGS}
> > > > > > > > - ${CMAKE_CURRENT_BINARY_DIR}
> > > > > > > > - DEPENDS cxx
> > > > > > > > - COMMENT "Running libcxx tests"
> > > > > > > > - ${cmake_3_2_USES_TERMINAL})
> > > > > > > > -
> > > > > > > > - if (LIBCXX_GENERATE_COVERAGE)
> > > > > > > > - include(CodeCoverage)
> > > > > > > > - set(output_dir "${CMAKE_CURRENT_BINARY_DIR}/coverage")
> > > > > > > > - set(capture_dirs
> > > > > > > >
> "${LIBCXX_LIB_CMAKEFILES_DIR}/cxx.dir/;${CMAKE_CURRENT_BINARY_DIR}")
> > > > > > > > - set(extract_dirs
> > > > > > > > "${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")
> > > > > > > > - setup_lcov_test_target_coverage("cxx" "${output_dir}"
> > > > > > > > "${capture_dirs}" "${extract_dirs}")
> > > > > > > > - endif()
> > > > > > > > -else()
> > > > > > > > - message(WARNING
> > > > > > > > - "LIT_EXECUTABLE not set, no check-libcxx target will be
> > > > > > > > available!")
> > > > > > > > +set(LIBCXX_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE
> > > > > > > > STRING
> > > > > > > > + "TargetInfo to use when setting up test environment.")
> > > > > > > > +set(LIBCXX_EXECUTOR "None" CACHE STRING
> > > > > > > > + "Executor to use when running tests.")
> > > > > > > > +
> > > > > > > > +set(AUTO_GEN_COMMENT "## Autogenerated by libcxx
> configuration.\n#
> > > > > > > > Do not
> > > > > > > > edit!")
> > > > > > > > +
> > > > > > > > +configure_file(
> > > > > > > > + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> > > > > > > > + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
> > > > > > > > + @ONLY)
> > > > > > > > +
> > > > > > > > +add_lit_testsuite(check-libcxx "Running libcxx tests"
> > > > > > > > + ${CMAKE_CURRENT_BINARY_DIR}
> > > > > > > > + DEPENDS cxx)
> > > > > > > > +
> > > > > > > > +if (LIBCXX_GENERATE_COVERAGE)
> > > > > > > > + include(CodeCoverage)
> > > > > > > > + set(output_dir "${CMAKE_CURRENT_BINARY_DIR}/coverage")
> > > > > > > > + set(capture_dirs
> > > > > > > >
> "${LIBCXX_LIB_CMAKEFILES_DIR}/cxx.dir/;${CMAKE_CURRENT_BINARY_DIR}")
> > > > > > > > + set(extract_dirs
> > > > > > > > "${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")
> > > > > > > > + setup_lcov_test_target_coverage("cxx" "${output_dir}"
> > > > > > > > "${capture_dirs}"
> > > > > > > > "${extract_dirs}")
> > > > > > > > endif()
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/test/lit.site.cfg.in
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.site.cfg.in?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/test/lit.site.cfg.in (original)
> > > > > > > > +++ libcxx/trunk/test/lit.site.cfg.in Wed Jul 29 16:07:28 2015
> > > > > > > > @@ -1,6 +1,5 @@
> > > > > > > > @AUTO_GEN_COMMENT@
> > > > > > > > config.cxx_under_test = "@LIBCXX_COMPILER@"
> > > > > > > > -config.std = "@LIBCXX_STD_VERSION@"
> > > > > > > > config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
> > > > > > > > config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
> > > > > > > > config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
> > > > > > > >
> > > > > > > > Modified: libcxx/trunk/www/index.html
> > > > > > > > URL:
> > > > > > > >
> > > > > > > >
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/index.html?rev=243574&r1=243573&r2=243574&view=diff
>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ==============================================================================
> > > > > > > > --- libcxx/trunk/www/index.html (original)
> > > > > > > > +++ libcxx/trunk/www/index.html Wed Jul 29 16:07:28 2015
> > > > > > > > @@ -184,26 +184,30 @@
> > > > > > > >
> > > > > > > > <p>In-tree build:</p>
> > > > > > > > <ul>
> > > > > > > > + <li><code>cd where-you-want-to-live</code></li>
> > > > > > > > <li>Check out libcxx and <a
> > > > > > > > href="http://libcxxabi.llvm.org/">libcxxabi</a>
> > > > > > > > into llvm/projects</li>
> > > > > > > > - <li><code>cd llvm</code></li>
> > > > > > > > + <li><code>cd where-you-want-to-build</code></li>
> > > > > > > > <li><code>mkdir build && cd build</code></li>
> > > > > > > > - <li><code>cmake .. # Linux may require
> -DCMAKE_C_COMPILER=clang
> > > > > > > > + <li><code>cmake path/to/llvm # Linux may require
> > > > > > > > -DCMAKE_C_COMPILER=clang
> > > > > > > > -DCMAKE_CXX_COMPILER=clang++</code></li>
> > > > > > > > <li><code>make cxx</code></li>
> > > > > > > > </ul>
> > > > > > > >
> > > > > > > > - <p>Out-of-tree build:</p>
> > > > > > > > + <p>Out-of-tree buildc:</p>
> > > > > > > > <ul>
> > > > > > > > - <li>Check out libcxx</li>
> > > > > > > > + <li><code>cd where-you-want-to-live</code></li>
> > > > > > > > + <li>Check out libcxx and llvm</li>
> > > > > > > > <li>If not on a Mac, also check out
> > > > > > > > <a href="http://libcxxabi.llvm.org/">libcxxabi</a></li>
> > > > > >
> > > > > > > > - <li><code>cd libcxx</code></li>
> > > > > > > > + <li><code>cd where-you-want-to-build</code></li>
> > > > > > > > <li><code>mkdir build && cd build</code></li>
> > > > > > > > - <li><code>cmake -DLIBCXX_CXX_ABI=libcxxabi
> > > > > > > > + <li><code>cmake -DLLVM_PATH=path/to/llvm
> > > > > > > > + -DLIBCXX_CXX_ABI=libcxxabi
> > > > > > > > -DLIBCXX_CXX_ABI_INCLUDE_PATHS=path/to/libcxxabi/include
> > > > > > > > - -DLIT_EXECUTABLE=path/to/llvm/utils/lit/lit.py .. # Linux
> > > > > > > > may
> > > > > > > > require
> > > > > > > > - -DCMAKE_C_COMPILER=clang
> > > > > > > > -DCMAKE_CXX_COMPILER=clang++</code></li>
> > > > > > > > + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
> > > > > > > > + path/to/libcxx
> > > > > > > > + </code></li>
> > > > > > > > <li><code>make</code></li>
> > > > > > > > </ul>
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > cfe-commits mailing list
> > > > > > > > cfe-commits@cs.uiuc.edu
> > > > > > > > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > cfe-commits mailing list
> > > > > > > cfe-commits@cs.uiuc.edu
> > > > > > > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> > > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Alexey Samsonov, Mountain View, CA
> > >
> > >
> > > _______________________________________________
> > > cfe-commits mailing list
> > > cfe-commits@cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> > >
> >
> >
> >
> > --
> > Alexey Samsonov
> > vonosmas@gmail.com
>
[Attachment #5 (text/html)]
<div dir="ltr">I still see the failures with r243591</div><div class="gmail_extra"><br><div \
class="gmail_quote">On Wed, Jul 29, 2015 at 4:24 PM, Eric Fiselier <span dir="ltr"><<a \
href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just pushed a \
possible fix to libc++. Let me know ASAP if that<br> doesn't fix the issue. I'll revert if \
r243591 doesn't work.<br> <br>
/Eric<br>
<span class=""><br>
On Wed, Jul 29, 2015 at 6:44 PM, Alexey Samsonov <<a \
href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a>> wrote:<br> > Eric,<br>
><br>
> Looks like it breaks the build of compiler-rt on Linux, and we can't fix it<br>
> instantly, sorry =/<br>
> Could you please revert it again?<br>
><br>
> The problem is that when I pass correct -DLLVM_CONFIG= value when<br>
> configuring standalone libcxx with<br>
> just-built Clang, libcxx invokes llvm/cmake/modules/HandleLLVMOptions.cmake,<br>
> and it fails with an error<br>
> "Host Clang version must be at least 3.1!",<br>
> because CMake is unable to properly determine the compiler version of<br>
> just-built Clang as 3.8.0 for<br>
> some reason(?!) I'm now looking into this issue, and will provide a patch to<br>
> compiler-rt that should accompany<br>
> re-land of libcxx CMake changes.<br>
><br>
</span><span class="">> On Wed, Jul 29, 2015 at 3:05 PM, Eric Fiselier <<a \
href="mailto:eric@efcs.ca">eric@efcs.ca</a>> wrote:<br> >><br>
>> Libc++ standalone builds now require that libc++ can find the LLVM source<br>
>> directory. If you specify the LLVM source root using<br>
>> "-DLLVM_PATH=path/to/llvm" then the command should work?<br>
>><br>
>> Does this new requirement work for you?<br>
>><br>
</span><span class="">>> On Jul 29, 2015 6:03 PM, "Alexey Samsonov" <<a \
href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br> >>><br>
>>> I'm looking into the fix now, it probably should go to compiler-rt<br>
>>> anyway, so I don't think we should revert libcxx part now.<br>
>>><br>
</span>>>> On Wed, Jul 29, 2015 at 2:59 PM, Kostya Serebryany <<a \
href="mailto:kcc@google.com">kcc@google.com</a>><br> <span class="">>>> wrote:<br>
>>>><br>
>>>> Eric,<br>
>>>> If there is no quick fix, will you be able to revert this, please?<br>
>>>><br>
>>>> On Wed, Jul 29, 2015 at 2:56 PM, Evgenii Stepanov<br>
</span><span class="">>>>> <<a \
href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@gmail.com</a>> wrote:<br> \
>>>>><br> >>>>> And the log says:<br>
>>>>><br>
>>>>> CMake Error at cmake/Modules/FindLLVM.cmake:41 (message):<br>
>>>>> llvm-config not found and LLVM_MAIN_SRC_DIR not defined. Reconfigure<br>
>>>>> with<br>
>>>>> -DLLVM_CONFIG=path/to/llvm-config or<br>
>>>>> -DLLVM_PATH=path/to/llvm-source-root.<br>
>>>>> Call Stack (most recent call first):<br>
>>>>> CMakeLists.txt:37 (include)<br>
>>>>><br>
</span>>>>>> On Wed, Jul 29, 2015 at 2:49 PM, Kostya Serebryany <<a \
href="mailto:kcc@google.com">kcc@google.com</a>><br> <div><div class="h5">>>>>> \
wrote:<br> >>>>> > I am seeing build failure when trying to run "ninja \
check-msan":<br> >>>>> ><br>
>>>>> > [39/58] Performing configure step for 'libcxx_msan-with-call'<br>
>>>>> > FAILED: cd<br>
>>>>> ><br>
>>>>> > \
/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/libcxx_msan-with-call/src/libcxx_msan-with-call-build<br>
>>>>> > && /usr/bin/cmake -P<br>
>>>>> ><br>
>>>>> > \
/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure.cmake<br>
>>>>> > && /usr/bin/cmake -E touch<br>
>>>>> ><br>
>>>>> > \
/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure<br>
>>>>> > CMake Error at<br>
>>>>> ><br>
>>>>> > \
/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure.cmake:16<br>
>>>>> > (message):<br>
>>>>> > Command failed: 1<br>
>>>>> ><br>
>>>>> > '/usr/bin/cmake'<br>
>>>>> ><br>
>>>>> > \
'-DCMAKE_C_COMPILER=/usr/local/google/home/kcc/llvm-gcc-build/./bin/clang'<br> \
>>>>> ><br> >>>>> > \
'-DCMAKE_CXX_COMPILER=/usr/local/google/home/kcc/llvm-gcc-build/./bin/clang'<br> \
>>>>> > '-DCMAKE_C_FLAGS= -fsanitize=memory -fsanitize-memory-track-origins<br> \
>>>>> > -Wno-pedantic -fsanitize=memory -fsanitize-memory-track-origins<br> \
>>>>> > -Wno-pedantic -mllvm -msan-instrumentation-with-call-threshold=0'<br> \
>>>>> > '-DCMAKE_CXX_FLAGS= -fsanitize=memory -fsanitize-memory-track-origins<br> \
>>>>> > -Wno-pedantic -fsanitize=memory -fsanitize-memory-track-origins<br> \
>>>>> > -Wno-pedantic -mllvm -msan-instrumentation-with-call-threshold=0'<br> \
>>>>> > '-DCMAKE_BUILD_TYPE=Release'<br> >>>>> ><br>
>>>>> > \
'-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call'<br>
>>>>> > '-GNinja' \
'/usr/local/google/home/kcc/llvm/projects/libcxx'<br> >>>>> ><br>
>>>>> > See also<br>
>>>>> ><br>
>>>>> ><br>
>>>>> ><br>
>>>>> > \
/usr/local/google/home/kcc/llvm-gcc-build/projects/compiler-rt/lib/msan/tests/../libcxx_msan-with-call/src/libcxx_msan-with-call-stamp/libcxx_msan-with-call-configure-*.log<br>
>>>>> ><br>
>>>>> ><br>
>>>>> > Looks like this is the only change that might have caused this.<br>
>>>>> ><br>
</div></div><span class="">>>>>> > On Wed, Jul 29, 2015 at 2:07 PM, Eric Fiselier \
<<a href="mailto:eric@efcs.ca">eric@efcs.ca</a>> wrote:<br> >>>>> >><br>
>>>>> >> Author: ericwf<br>
>>>>> >> Date: Wed Jul 29 16:07:28 2015<br>
>>>>> >> New Revision: 243574<br>
>>>>> >><br>
</span>>>>>> >> URL: <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D243574-26 \
view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=gmNxZ1jLyji3tlzZsi0C7kks1iApTwDaLWInfLfrbPM&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=243574&view=rev</a><br> \
<span class="">>>>>> >> Log:<br> >>>>> >> Recommit r243503 \
"[libcxx] Cleanup CMake configuration and integrate<br> >>>>> >> with<br>
>>>>> >> LLVM"<br>
>>>>> >><br>
>>>>> >> This change was reverted in r243550 because it broke clang-format<br>
>>>>> >> builds<br>
>>>>> >> (see PR24306).<br>
>>>>> >><br>
>>>>> >> This patch recommits a fixed version of the original.<br>
>>>>> >><br>
>>>>> >> Added:<br>
>>>>> >> libcxx/trunk/cmake/Modules/FindLLVM.cmake<br>
>>>>> >> libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake<br>
>>>>> >> Modified:<br>
>>>>> >> libcxx/trunk/CMakeLists.txt<br>
>>>>> >> libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake<br>
>>>>> >> libcxx/trunk/cmake/config-ix.cmake<br>
>>>>> >> libcxx/trunk/lib/CMakeLists.txt<br>
>>>>> >> libcxx/trunk/test/CMakeLists.txt<br>
</span><span class="">>>>>> >> libcxx/trunk/test/<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.in&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=LDfQXxz0_2T4eAZr6s8uuSpe8_AIjA18L6SSOxO38r8&e=" \
rel="noreferrer" target="_blank">lit.site.cfg.in</a><br> >>>>> >> \
libcxx/trunk/www/index.html<br> >>>>> >><br>
>>>>> >> Modified: libcxx/trunk/CMakeLists.txt<br>
>>>>> >> URL:<br>
>>>>> >><br>
</span><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_CMak \
eLists.txt-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BS \
qEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=hBZKgiAl4UU1j5jgEGu4CwvHsFMiWzqVzh1RCF3Dswk&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/CMakeLists.txt (original)<br> >>>>> >> +++ \
libcxx/trunk/CMakeLists.txt Wed Jul 29 16:07:28 2015<br> >>>>> >> @@ -3,13 +3,16 \
@@<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> # Setup Project<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> -<br> >>>>> >> -project(libcxx CXX C)<br>
>>>>> >> cmake_minimum_required(VERSION 2.8)<br>
>>>>> >><br>
>>>>> >> if(POLICY CMP0042)<br>
>>>>> >> cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default<br>
>>>>> >> endif()<br>
>>>>> >> +if(POLICY CMP0022)<br>
>>>>> >> + cmake_policy(SET CMP0022 NEW) # Required when interacting with<br>
>>>>> >> LLVM and<br>
>>>>> >> Clang<br>
>>>>> >> +endif()<br>
>>>>> >> +<br>
>>>>> >> +project(libcxx CXX C)<br>
>>>>> >><br>
>>>>> >> set(PACKAGE_NAME libcxx)<br>
>>>>> >> set(PACKAGE_VERSION trunk-svn)<br>
>>>>> >> @@ -30,52 +33,90 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<br>
>>>>> >> build directory and run 'cmake /path/to/${PROJECT_NAME} \
[options]'<br> >>>>> >> there."<br>
>>>>> >> )<br>
>>>>> >><br>
>>>>> >> -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)<br>
>>>>> >> - set(LIBCXX_LIBDIR_SUFFIX "" CACHE STRING<br>
>>>>> >> - "Define suffix of library directory name (32/64)")<br>
>>>>> >> -<br>
>>>>> >> - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY<br>
>>>>> >> ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})<br>
>>>>> >> - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY<br>
>>>>> >> ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})<br>
>>>>> >> -<br>
>>>>> >> - set(LIBCXX_BUILT_STANDALONE 1)<br>
>>>>> >> -else()<br>
>>>>> >> - set(LIBCXX_LIBDIR_SUFFIX ${LLVM_LIBDIR_SUFFIX})<br>
>>>>> >> -endif()<br>
>>>>> >> +# Find the required bits of LLVM<br>
>>>>> >> +include(FindLLVM)<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> # Setup CMake Options<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>><br> >>>>> >> -# Define options.<br>
>>>>> >> -option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)<br>
>>>>> >> -option(LIBCXX_ENABLE_RTTI "Use run time type information." \
ON)<br> >>>>> >> +# Basic options<br>
>>>>> >> ---------------------------------------------------------------<br>
>>>>> >> option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent \
of<br> >>>>> >> build<br>
>>>>> >> mode." ON)<br>
>>>>> >> -option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled." \
ON)<br> >>>>> >> -option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning \
is<br> >>>>> >> triggered."<br>
>>>>> >> OFF)<br>
>>>>> >> -option(LIBCXX_ENABLE_CXX1Y "Enable -std=c++1y and use of c++1y<br>
>>>>> >> language<br>
>>>>> >> features if the compiler supports it." OFF)<br>
>>>>> >> option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." \
ON)<br> >>>>> >> +<br>
>>>>> >> +set(LIBCXX_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE \
STRING<br> >>>>> >> + "Define suffix of library directory name \
(32/64)")<br> >>>>> >> +option(LIBCXX_INSTALL_HEADERS "Install the libc++ \
headers." ON)<br> >>>>> >> +option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install \
libc++ support<br> >>>>> >> headers."<br>
>>>>> >> ON)<br>
>>>>> >> +<br>
>>>>> >> +# ABI Library options<br>
>>>>> >> ---------------------------------------------------------<br>
>>>>> >> +set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING<br>
>>>>> >> + "Specify C++ ABI library to use." FORCE)<br>
>>>>> >> +set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)<br>
>>>>> >> +set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})<br>
>>>>> >> +<br>
>>>>> >> +option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI<br>
>>>>> >> library"<br>
>>>>> >> OFF)<br>
>>>>> >> +<br>
>>>>> >> +# Build libc++abi with libunwind. We need this option to determine<br>
>>>>> >> whether to<br>
>>>>> >> +# link with libunwind or libgcc_s while running the test cases.<br>
>>>>> >> +option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM<br>
>>>>> >> unwinder."<br>
>>>>> >> OFF)<br>
>>>>> >> +<br>
>>>>> >> +# Target options<br>
>>>>> >> --------------------------------------------------------------<br>
>>>>> >> +option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." OFF)<br>
>>>>> >> +set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate \
sysroot.")<br> >>>>> >> +set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING \
"Use alternate GCC<br> >>>>> >> toolchain.")<br>
>>>>> >> +<br>
>>>>> >> +# Feature options<br>
>>>>> >> -------------------------------------------------------------<br>
>>>>> >> +option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)<br>
>>>>> >> +option(LIBCXX_ENABLE_RTTI "Use run time type information." \
ON)<br> >>>>> >> option(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE "Build \
libc++ with<br> >>>>> >> support for the global filesystem namespace." ON)<br>
>>>>> >> option(LIBCXX_ENABLE_STDIN "Build libc++ with support for<br>
>>>>> >> stdin/std::cin." ON)<br>
>>>>> >> option(LIBCXX_ENABLE_STDOUT "Build libc++ with support for<br>
>>>>> >> stdout/std::cout." ON)<br>
>>>>> >> option(LIBCXX_ENABLE_THREADS "Build libc++ with support for<br>
>>>>> >> threads." ON)<br>
>>>>> >> option(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS "Build libc++ \
with<br> >>>>> >> support<br>
>>>>> >> for thread-unsafe C functions" ON)<br>
>>>>> >> -option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++" OFF)<br>
>>>>> >> option(LIBCXX_ENABLE_MONOTONIC_CLOCK<br>
>>>>> >> "Build libc++ with support for a monotonic clock.<br>
>>>>> >> This option may only be used when \
LIBCXX_ENABLE_THREADS=OFF."<br> >>>>> >> ON)<br>
>>>>> >> -option(LIBCXX_INSTALL_HEADERS "Install the libc++ headers." \
ON)<br> >>>>> >> -option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ \
support<br> >>>>> >> headers."<br>
>>>>> >> ON)<br>
>>>>> >> +<br>
>>>>> >> +# Misc options<br>
>>>>> >> ----------------------------------------------------------------<br>
>>>>> >> +option(LIBCXX_ENABLE_PEDANTIC "Compile with pedantic enabled." \
ON)<br> >>>>> >> +option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning \
is<br> >>>>> >> triggered."<br>
>>>>> >> OFF)<br>
>>>>> >> +<br>
>>>>> >> option(LIBCXX_GENERATE_COVERAGE "Enable generating code \
coverage."<br> >>>>> >> OFF)<br>
>>>>> >> set(LIBCXX_COVERAGE_LIBRARY "" CACHE STRING<br>
>>>>> >> - "The Profile-rt library used to build with code \
coverage")<br> >>>>> >> -option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY \
"Statically link the ABI<br> >>>>> >> library"<br>
>>>>> >> OFF)<br>
>>>>> >> -set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate \
sysroot.")<br> >>>>> >> -set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING \
"Use alternate GCC<br> >>>>> >> toolchain.")<br>
>>>>> >> -if (LIBCXX_BUILT_STANDALONE)<br>
>>>>> >> - set(LLVM_USE_SANITIZER "" CACHE STRING<br>
>>>>> >> - "Define the sanitizer used to build the library and \
tests")<br> >>>>> >> + "The Profile-rt library used to build with \
code coverage")<br> >>>>> >> +<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
+#===============================================================================<br> \
>>>>> >> +# Check option configurations<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
+#===============================================================================<br> \
>>>>> >> +<br> >>>>> >> +# Ensure LIBCXX_ENABLE_MONOTONIC_CLOCK \
is set to ON only when<br> >>>>> >> +# LIBCXX_ENABLE_THREADS is on.<br>
>>>>> >> +if(LIBCXX_ENABLE_THREADS AND NOT LIBCXX_ENABLE_MONOTONIC_CLOCK)<br>
>>>>> >> + message(FATAL_ERROR "LIBCXX_ENABLE_MONOTONIC_CLOCK can only be<br>
>>>>> >> set to<br>
>>>>> >> OFF"<br>
>>>>> >> + " when LIBCXX_ENABLE_THREADS is also \
set to<br> >>>>> >> OFF.")<br>
>>>>> >> +endif()<br>
>>>>> >> +<br>
>>>>> >> +# Ensure LLVM_USE_SANITIZER is not specified when<br>
>>>>> >> LIBCXX_GENERATE_COVERAGE<br>
>>>>> >> +# is ON.<br>
>>>>> >> +if (LLVM_USE_SANITIZER AND LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> + message(FATAL_ERROR "LLVM_USE_SANITIZER cannot be used with<br>
>>>>> >> LIBCXX_GENERATE_COVERAGE")<br>
>>>>> >> +endif()<br>
>>>>> >> +<br>
>>>>> >> +# Set LIBCXX_BUILD_32_BITS to (LIBCXX_BUILD_32_BITS OR<br>
>>>>> >> LLVM_BUILD_32_BITS)<br>
>>>>> >> +# and check that we can build with 32 bits if requested.<br>
>>>>> >> +if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)<br>
>>>>> >> + if (LIBCXX_BUILD_32_BITS OR LLVM_BUILD_32_BITS)<br>
>>>>> >> + if (NOT LLVM_BUILD_32_BITS) # Don't duplicate the output \
from<br> >>>>> >> LLVM<br>
>>>>> >> + message(STATUS "Building 32 bits executables and \
libraries.")<br> >>>>> >> + endif()<br>
>>>>> >> + set(LIBCXX_BUILD_32_BITS ON CACHE BOOL "" FORCE)<br>
>>>>> >> + endif()<br>
>>>>> >> +elseif(LIBCXX_BUILD_32_BITS)<br>
>>>>> >> + message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported \
on<br> >>>>> >> this<br>
>>>>> >> platform.")<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> +# Check that this option is not enabled on Apple and emit a usage<br>
>>>>> >> warning.<br>
>>>>> >> if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)<br>
>>>>> >> if (APPLE)<br>
>>>>> >> message(FATAL_ERROR "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is \
not<br> >>>>> >> supported on OS X")<br>
>>>>> >> @@ -84,27 +125,6 @@ if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)<br>
>>>>> >> endif()<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> -set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)<br>
>>>>> >> -if (NOT LIBCXX_CXX_ABI)<br>
>>>>> >> - if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND<br>
>>>>> >> - IS_DIRECTORY \
"${CMAKE_SOURCE_DIR}/projects/libcxxabi")<br> >>>>> >> - \
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")<br> >>>>> >> - \
set(LIBCXX_CXX_ABI_INCLUDE_PATHS<br> >>>>> >> \
"${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")<br> >>>>> >> - \
set(LIBCXX_CXX_ABI_INTREE 1)<br> >>>>> >> - else ()<br>
>>>>> >> - set(LIBCXX_CXX_ABI_LIBNAME "none")<br>
>>>>> >> - endif ()<br>
>>>>> >> -else ()<br>
>>>>> >> - set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")<br>
>>>>> >> -endif ()<br>
>>>>> >> -set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING<br>
>>>>> >> - "Specify C++ ABI library to use." FORCE)<br>
>>>>> >> -set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})<br>
>>>>> >> -<br>
>>>>> >> -# Build libc++abi with libunwind. We need this option to determine<br>
>>>>> >> whether to<br>
>>>>> >> -# link with libunwind or libgcc_s while running the test cases.<br>
>>>>> >> -option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM<br>
>>>>> >> unwinder."<br>
>>>>> >> OFF)<br>
>>>>> >> -<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> # Configure System<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> @@ -114,234 +134,113 @@ set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_S<br> >>>>> \
>> set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})<br> >>>>> >> \
set(LIBCXX_LIBRARY_DIR<br> >>>>> >> \
${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})<br> >>>>> >><br>
>>>>> >> +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})<br>
>>>>> >> +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})<br>
>>>>> >> +<br>
>>>>> >> # Declare libc++ configuration variables.<br>
>>>>> >> # They are intended for use as follows:<br>
>>>>> >> # LIBCXX_CXX_FLAGS: General flags for both the compiler and linker.<br>
>>>>> >> # LIBCXX_COMPILE_FLAGS: Compile only flags.<br>
>>>>> >> # LIBCXX_LINK_FLAGS: Linker only flags.<br>
>>>>> >> -set(LIBCXX_CXX_FLAGS "")<br>
>>>>> >> set(LIBCXX_COMPILE_FLAGS "")<br>
>>>>> >> set(LIBCXX_LINK_FLAGS "")<br>
>>>>> >> +set(LIBCXX_LIBRARIES "")<br>
>>>>> >><br>
>>>>> >> # Configure compiler.<br>
>>>>> >> include(config-ix)<br>
>>>>> >> -# Configure ABI library<br>
>>>>> >> -include(HandleLibCXXABI)<br>
>>>>> >> +<br>
>>>>> >> # Configure coverage options.<br>
>>>>> >> if (LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> include(CodeCoverage)<br>
>>>>> >> set(CMAKE_BUILD_TYPE "COVERAGE" CACHE STRING "" \
FORCE)<br> >>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> +string(TOUPPER "${CMAKE_BUILD_TYPE}" \
uppercase_CMAKE_BUILD_TYPE)<br> >>>>> >> +<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> # Setup Compiler Flags<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>><br> >>>>> >> -# Get required flags.<br>
>>>>> >> -# On all systems the system c++ standard library headers need to be<br>
>>>>> >> excluded.<br>
>>>>> >> -if (MSVC)<br>
>>>>> >> - # MSVC only has -X, which disables all default includes;<br>
>>>>> >> including the<br>
>>>>> >> crt.<br>
>>>>> >> - # Thus, we do nothing and hope we don't accidentally include \
any<br> >>>>> >> of the<br>
>>>>> >> C++<br>
>>>>> >> - # headers.<br>
>>>>> >> -else()<br>
>>>>> >> - if (LIBCXX_HAS_NOSTDINCXX_FLAG)<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS -nostdinc++)<br>
>>>>> >> - string(REPLACE "-stdlib=libc++" "" \
CMAKE_CXX_FLAGS<br> >>>>> >> "${CMAKE_CXX_FLAGS}")<br>
>>>>> >> - string(REPLACE "-stdlib=libstdc++" "" \
CMAKE_CXX_FLAGS<br> >>>>> >> "${CMAKE_CXX_FLAGS}")<br>
>>>>> >> - endif()<br>
>>>>> >> - # If c++1y has been enabled then attempt to use it. Fail if it is<br>
>>>>> >> no<br>
>>>>> >> supported<br>
>>>>> >> - # by the compiler. Otherwise choose c++11 and ensure the compiler<br>
>>>>> >> supports it.<br>
>>>>> >> - if (LIBCXX_ENABLE_CXX1Y)<br>
>>>>> >> - if (LIBCXX_HAS_STDCXX1Y_FLAG)<br>
>>>>> >> - set(LIBCXX_STD_VERSION c++1y)<br>
>>>>> >> - else()<br>
>>>>> >> - message(FATAL_ERROR "c++1y was enabled but the compiler \
does<br> >>>>> >> not<br>
>>>>> >> support it.")<br>
>>>>> >> - endif()<br>
>>>>> >> - else()<br>
>>>>> >> - if (LIBCXX_HAS_STDCXX11_FLAG)<br>
>>>>> >> - set(LIBCXX_STD_VERSION c++11)<br>
>>>>> >> - else()<br>
>>>>> >> - message(FATAL_ERROR "c++11 is required by libc++ but is \
not<br> >>>>> >> supported by the compiler")<br>
>>>>> >> - endif()<br>
>>>>> >> - endif()<br>
>>>>> >> - # LIBCXX_STD_VERSION should always be set at this point.<br>
>>>>> >> - list(APPEND LIBCXX_CXX_FLAGS \
"-std=${LIBCXX_STD_VERSION}")<br> >>>>> >> -endif()<br>
>>>>> >> +include(HandleLibCXXABI) # Steup the ABI library flags<br>
>>>>> >><br>
>>>>> >> -macro(append_if list condition var)<br>
>>>>> >> - if (${condition})<br>
>>>>> >> - list(APPEND ${list} ${var})<br>
>>>>> >> - endif()<br>
>>>>> >> -endmacro()<br>
>>>>> >> +# Include macros for adding and removing libc++ flags.<br>
>>>>> >> +include(HandleLibcxxFlags)<br>
>>>>> >><br>
>>>>> >> -# Get warning flags<br>
>>>>> >> -# Disable the system header pragma.<br>
>>>>> >> -add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)<br>
>>>>> >> -if (NOT MSVC)<br>
>>>>> >> - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WALL_FLAG -Wall)<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS -Werror=return-type)<br>
>>>>> >> +# Remove flags that may have snuck in.<br>
>>>>> >> +remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG<br>
>>>>> >> + -stdlib=libc++ -stdlib=libstdc++ -lc++abi -m32)<br>
>>>>> >> +<br>
>>>>> >> +# Required flags<br>
>>>>> >> ==============================================================<br>
>>>>> >> +add_compile_flags_if_supported(-std=c++11)<br>
>>>>> >> +if (NOT MSVC AND NOT LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG)<br>
>>>>> >> + message(FATAL_ERROR "C++11 is required but the compiler does \
not<br> >>>>> >> support -std=c++11")<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_W_FLAG -W)<br>
>>>>> >> -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG<br>
>>>>> >> -Wno-unused-parameter)<br>
>>>>> >> -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WWRITE_STRINGS_FLAG<br>
>>>>> >> -Wwrite-strings)<br>
>>>>> >> -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WNO_LONG_LONG_FLAG<br>
>>>>> >> -Wno-long-long)<br>
>>>>> >> +# On all systems the system c++ standard library headers need to be<br>
>>>>> >> excluded.<br>
>>>>> >> +# MSVC only has -X, which disables all default includes; including<br>
>>>>> >> the<br>
>>>>> >> crt.<br>
>>>>> >> +# Thus, we do nothing and hope we don't accidentally include any \
of<br> >>>>> >> the<br>
>>>>> >> C++<br>
>>>>> >> +# headers<br>
>>>>> >> +add_compile_flags_if_supported(-nostdinc++)<br>
>>>>> >> +<br>
>>>>> >> +# Target flags<br>
>>>>> >> ================================================================<br>
>>>>> >> +add_flags_if(LIBCXX_BUILD_32_BITS -m32)<br>
>>>>> >> +add_flags_if(LIBCXX_TARGET_TRIPLE "-target<br>
>>>>> >> ${LIBCXX_TARGET_TRIPLE}")<br>
>>>>> >> +add_flags_if(LIBCXX_SYSROOT "--sysroot ${LIBCXX_SYSROOT}")<br>
>>>>> >> +add_flags_if(LIBCXX_GCC_TOOLCHAIN "-gcc-toolchain<br>
>>>>> >> ${LIBCXX_GCC_TOOLCHAIN}")<br>
>>>>> >> +<br>
>>>>> >> +# Warning flags<br>
>>>>> >> ===============================================================<br>
>>>>> >> +add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)<br>
>>>>> >> +add_compile_flags_if_supported(<br>
>>>>> >> + -Wall -W -Wwrite-strings<br>
>>>>> >> + -Wno-unused-parameter -Wno-long-long<br>
>>>>> >> + -Werror=return-type)<br>
>>>>> >> if (LIBCXX_ENABLE_WERROR)<br>
>>>>> >> - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WERROR_FLAG -Werror)<br>
>>>>> >> - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WX_FLAG -WX)<br>
>>>>> >> -else()<br>
>>>>> >> - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_WNO_ERROR_FLAG<br>
>>>>> >> -Wno-error)<br>
>>>>> >> - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_NO_WX_FLAG -WX-)<br>
>>>>> >> + add_compile_flags_if_supported(-Werror)<br>
>>>>> >> + add_compile_flags_if_supported(-WX)<br>
>>>>> >> endif()<br>
>>>>> >> if (LIBCXX_ENABLE_PEDANTIC)<br>
>>>>> >> - append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_PEDANTIC_FLAG<br>
>>>>> >> -pedantic)<br>
>>>>> >> + add_compile_flags_if_supported(-pedantic)<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> -# Get feature flags.<br>
>>>>> >> -# Exceptions<br>
>>>>> >> +# Exception flags<br>
>>>>> >> =============================================================<br>
>>>>> >> if (LIBCXX_ENABLE_EXCEPTIONS)<br>
>>>>> >> # Catches C++ exceptions only and tells the compiler to assume<br>
>>>>> >> that<br>
>>>>> >> extern C<br>
>>>>> >> # functions never throw a C++ exception.<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_EHSC_FLAG -EHsc)<br>
>>>>> >> + add_compile_flags_if_supported(-EHsc)<br>
>>>>> >> else()<br>
>>>>> >> - list(APPEND LIBCXX_CXX_FLAGS -D_LIBCPP_NO_EXCEPTIONS)<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_NO_EHS_FLAG -EHs-)<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_NO_EHA_FLAG -EHa-)<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_FNO_EXCEPTIONS_FLAG<br>
>>>>> >> -fno-exceptions)<br>
>>>>> >> + add_definitions(-D_LIBCPP_NO_EXCEPTIONS)<br>
>>>>> >> + add_compile_flags_if_supported(-EHs- -EHa-)<br>
>>>>> >> + add_compile_flags_if_supported(-fno-exceptions)<br>
>>>>> >> endif()<br>
>>>>> >> -# RTTI<br>
>>>>> >> +<br>
>>>>> >> +# RTTI flags<br>
>>>>> >> ==================================================================<br>
>>>>> >> if (NOT LIBCXX_ENABLE_RTTI)<br>
>>>>> >> - list(APPEND LIBCXX_CXX_FLAGS -D_LIBCPP_NO_RTTI)<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_NO_GR_FLAG -GR-)<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS LIBCXX_HAS_FNO_RTTI_FLAG -fno-rtti)<br>
>>>>> >> + add_definitions(-D_LIBCPP_NO_RTTI)<br>
>>>>> >> + add_compile_flags_if_supported(-GR-)<br>
>>>>> >> + add_compile_flags_if_supported(-fno-rtti)<br>
>>>>> >> endif()<br>
>>>>> >> -# Assert<br>
>>>>> >> -string(TOUPPER "${CMAKE_BUILD_TYPE}" \
uppercase_CMAKE_BUILD_TYPE)<br> >>>>> >> +<br>
>>>>> >> +# Assertion flags<br>
>>>>> >> =============================================================<br>
>>>>> >> +define_if(LIBCXX_ENABLE_ASSERTIONS -UNDEBUG)<br>
>>>>> >> +define_if_not(LIBCXX_ENABLE_ASSERTIONS -DNDEBUG)<br>
>>>>> >> if (LIBCXX_ENABLE_ASSERTIONS)<br>
>>>>> >> # MSVC doesn't like _DEBUG on release builds. See PR 4379.<br>
>>>>> >> - if (NOT MSVC)<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS -D_DEBUG)<br>
>>>>> >> - endif()<br>
>>>>> >> - # On Release builds cmake automatically defines NDEBUG, so we<br>
>>>>> >> - # explicitly undefine it:<br>
>>>>> >> - if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS -UNDEBUG)<br>
>>>>> >> - endif()<br>
>>>>> >> -else()<br>
>>>>> >> - if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS -DNDEBUG)<br>
>>>>> >> - endif()<br>
>>>>> >> -endif()<br>
>>>>> >> -# Static library<br>
>>>>> >> -if (NOT LIBCXX_ENABLE_SHARED)<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS -D_LIBCPP_BUILD_STATIC)<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)<br>
>>>>> >> - if (LIBCXX_BUILD_32_BITS)<br>
>>>>> >> - message(STATUS "Building 32 bits executables and \
libraries.")<br> >>>>> >> - list(APPEND LIBCXX_CXX_FLAGS \
"-m32")<br> >>>>> >> - endif()<br>
>>>>> >> -elseif(LIBCXX_BUILD_32_BITS)<br>
>>>>> >> - message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported \
on<br> >>>>> >> this<br>
>>>>> >> platform.")<br>
>>>>> >> -endif()<br>
>>>>> >> -# This is the _ONLY_ place where add_definitions is called.<br>
>>>>> >> -if (MSVC)<br>
>>>>> >> - add_definitions(-D_CRT_SECURE_NO_WARNINGS)<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -# LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE configuration<br>
>>>>> >> -if (NOT LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE)<br>
>>>>> >> - add_definitions(-D_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE)<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -# LIBCXX_ENABLE_STDIN configuration<br>
>>>>> >> -if (NOT LIBCXX_ENABLE_STDIN)<br>
>>>>> >> - add_definitions(-D_LIBCPP_HAS_NO_STDIN)<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -# LIBCXX_ENABLE_STDOUT configuration<br>
>>>>> >> -if (NOT LIBCXX_ENABLE_STDOUT)<br>
>>>>> >> - add_definitions(-D_LIBCPP_HAS_NO_STDOUT)<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -# LIBCXX_ENABLE_THREADS configuration<br>
>>>>> >> -if (NOT LIBCXX_ENABLE_THREADS)<br>
>>>>> >> - add_definitions(-D_LIBCPP_HAS_NO_THREADS)<br>
>>>>> >> - if (NOT LIBCXX_ENABLE_MONOTONIC_CLOCK)<br>
>>>>> >> - add_definitions(-D_LIBCPP_HAS_NO_MONOTONIC_CLOCK)<br>
>>>>> >> - endif()<br>
>>>>> >> -# Ensure LIBCXX_ENABLE_MONOTONIC_CLOCK is set to ON.<br>
>>>>> >> -elseif(NOT LIBCXX_ENABLE_MONOTONIC_CLOCK)<br>
>>>>> >> - message(FATAL_ERROR "LIBCXX_ENABLE_MONOTONIC_CLOCK can only be<br>
>>>>> >> set to<br>
>>>>> >> OFF"<br>
>>>>> >> - " when LIBCXX_ENABLE_THREADS is also \
set to<br> >>>>> >> OFF.")<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -# LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS configuration<br>
>>>>> >> -if (NOT LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS)<br>
>>>>> >> - add_definitions(-D_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS)<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -# Configure for sanitizers. If LIBCXX_BUILT_STANDALONE then we have<br>
>>>>> >> to do<br>
>>>>> >> -# the flag translation ourselves. Othewise LLVM's CMakeList.txt<br>
>>>>> >> will<br>
>>>>> >> handle it.<br>
>>>>> >> -if (LIBCXX_BUILT_STANDALONE)<br>
>>>>> >> - # NOTE: LLVM_USE_SANITIZER checks for a UNIX like system instead<br>
>>>>> >> of<br>
>>>>> >> MSVC.<br>
>>>>> >> - # But we don't have LLVM_ON_UNIX so checking for MSVC is the \
best<br> >>>>> >> we<br>
>>>>> >> can do.<br>
>>>>> >> - if (LLVM_USE_SANITIZER AND NOT MSVC)<br>
>>>>> >> - append_if(LIBCXX_CXX_FLAGS<br>
>>>>> >> LIBCXX_HAS_FNO_OMIT_FRAME_POINTER_FLAG<br>
>>>>> >> - "-fno-omit-frame-pointer")<br>
>>>>> >> - if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" \
AND<br> >>>>> >> - NOT uppercase_CMAKE_BUILD_TYPE STREQUAL \
"RELWITHDEBINFO")<br> >>>>> >> - append_if(LIBCXX_CXX_FLAGS \
LIBCXX_HAS_GLINE_TABLES_ONLY_FLAG<br> >>>>> >> - \
"-gline-tables-only")<br> >>>>> >> - endif()<br>
>>>>> >> - if (LLVM_USE_SANITIZER STREQUAL "Address")<br>
>>>>> >> - list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=address")<br>
>>>>> >> - elseif (LLVM_USE_SANITIZER MATCHES \
"Memory(WithOrigins)?")<br> >>>>> >> - list(APPEND \
LIBCXX_CXX_FLAGS "-fsanitize=memory")<br> >>>>> >> - if \
(LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")<br> >>>>> >> - \
list(APPEND LIBCXX_CXX_FLAGS<br> >>>>> >> \
"-fsanitize-memory-track-origins")<br> >>>>> >> - endif()<br>
>>>>> >> - elseif (LLVM_USE_SANITIZER STREQUAL "Undefined")<br>
>>>>> >> - list(APPEND LIBCXX_CXX_FLAGS<br>
>>>>> >> - "-fsanitize=undefined -fno-sanitize=vptr,function<br>
>>>>> >> -fno-sanitize-recover")<br>
>>>>> >> - elseif (LLVM_USE_SANITIZER STREQUAL "Thread")<br>
>>>>> >> - list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=thread")<br>
>>>>> >> - else()<br>
>>>>> >> - message(WARNING "Unsupported value of \
LLVM_USE_SANITIZER:<br> >>>>> >> ${LLVM_USE_SANITIZER}")<br>
>>>>> >> - endif()<br>
>>>>> >> - elseif(MSVC)<br>
>>>>> >> - message(WARNING "LLVM_USE_SANITIZER is not supported with<br>
>>>>> >> MSVC")<br>
>>>>> >> - endif()<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -append_if(LIBCXX_CXX_FLAGS LIBCXX_TARGET_TRIPLE<br>
>>>>> >> - "-target ${LIBCXX_TARGET_TRIPLE}")<br>
>>>>> >> -<br>
>>>>> >> -append_if(LIBCXX_CXX_FLAGS LIBCXX_SYSROOT "--sysroot<br>
>>>>> >> ${LIBCXX_SYSROOT}")<br>
>>>>> >> -append_if(LIBCXX_CXX_FLAGS LIBCXX_GCC_TOOLCHAIN<br>
>>>>> >> - "-gcc-toolchain ${LIBCXX_GCC_TOOLCHAIN}")<br>
>>>>> >> -<br>
>>>>> >> -if (LLVM_USE_SANITIZER AND LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> - message(FATAL_ERROR "LLVM_USE_SANITIZER cannot be used with<br>
>>>>> >> LIBCXX_GENERATE_COVERAGE")<br>
>>>>> >> + define_if_not(MSVC -D_DEBUG)<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> -string(REPLACE ";" " " LIBCXX_CXX_FLAGS \
"${LIBCXX_CXX_FLAGS}")<br> >>>>> >> -set(CMAKE_CXX_FLAGS \
"${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_FLAGS}")<br> >>>>> >> +# Feature \
flags<br> >>>>> >> \
===============================================================<br> >>>>> >> \
+define_if(MSVC -D_CRT_SECURE_NO_WARNINGS)<br> >>>>> >> \
+define_if_not(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE<br> >>>>> >> \
-D_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE)<br> >>>>> >> \
+define_if_not(LIBCXX_ENABLE_STDIN -D_LIBCPP_HAS_NO_STDIN)<br> >>>>> >> \
+define_if_not(LIBCXX_ENABLE_STDOUT -D_LIBCPP_HAS_NO_STDOUT)<br> >>>>> >> \
+define_if_not(LIBCXX_ENABLE_THREADS -D_LIBCPP_HAS_NO_THREADS)<br> >>>>> >> \
+define_if_not(LIBCXX_ENABLE_MONOTONIC_CLOCK<br> >>>>> >> \
-D_LIBCPP_HAS_NO_MONOTONIC_CLOCK)<br> >>>>> >> \
+define_if_not(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS<br> >>>>> >> \
-D_LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS)<br> >>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> -# Setup Source Code<br> >>>>> >> +# Setup Source Code And Tests<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
#===============================================================================<br> >>>>> \
>> -<br> >>>>> >> include_directories(include)<br>
>>>>> >> add_subdirectory(include)<br>
>>>>> >> -<br>
>>>>> >> -# Add source code. This also contains all of the logic for deciding<br>
>>>>> >> linker flags<br>
>>>>> >> -# soname, etc...<br>
>>>>> >> add_subdirectory(lib)<br>
>>>>> >> -<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
-#===============================================================================<br> \
>>>>> >> -# Setup Tests<br> >>>>> >><br>
>>>>> >><br>
>>>>> >> \
-#===============================================================================<br> \
>>>>> >> -<br> >>>>> >> add_subdirectory(test)<br>
>>>>> >><br>
>>>>> >> Added: libcxx/trunk/cmake/Modules/FindLLVM.cmake<br>
>>>>> >> URL:<br>
>>>>> >><br>
</div></div><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_cmak \
e_Modules_FindLLVM.cmake-3Frev-3D243574-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8S \
yngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=dZ5do20lO_LHJpJtphkvMiNwIYif1tPyMRSNOPj-IuE&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/FindLLVM.cmake?rev=243574&view=auto</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/cmake/Modules/FindLLVM.cmake (added)<br> >>>>> >> +++ \
libcxx/trunk/cmake/Modules/FindLLVM.cmake Wed Jul 29 16:07:28<br> >>>>> >> 2015<br>
>>>>> >> @@ -0,0 +1,81 @@<br>
>>>>> >> +<br>
>>>>> >> +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)<br>
>>>>> >> + # Rely on llvm-config.<br>
>>>>> >> + set(CONFIG_OUTPUT)<br>
>>>>> >> + find_program(LLVM_CONFIG "llvm-config")<br>
>>>>> >> + if(DEFINED LLVM_PATH)<br>
>>>>> >> + set(LLVM_INCLUDE_DIR ${LLVM_INCLUDE_DIR} CACHE PATH "Path \
to<br> >>>>> >> llvm/include")<br>
>>>>> >> + set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source<br>
>>>>> >> tree")<br>
>>>>> >> + set(LLVM_MAIN_SRC_DIR ${LLVM_PATH})<br>
>>>>> >> + set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules")<br>
>>>>> >> + elseif(LLVM_CONFIG)<br>
>>>>> >> + message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")<br>
>>>>> >> + set(CONFIG_COMMAND ${LLVM_CONFIG}<br>
>>>>> >> + "--includedir"<br>
>>>>> >> + "--prefix"<br>
>>>>> >> + "--src-root")<br>
>>>>> >> + execute_process(<br>
>>>>> >> + COMMAND ${CONFIG_COMMAND}<br>
>>>>> >> + RESULT_VARIABLE HAD_ERROR<br>
>>>>> >> + OUTPUT_VARIABLE CONFIG_OUTPUT<br>
>>>>> >> + )<br>
>>>>> >> + if(NOT HAD_ERROR)<br>
>>>>> >> + string(REGEX REPLACE<br>
>>>>> >> + "[ \t]*[\r\n]+[ \t]*" ";"<br>
>>>>> >> + CONFIG_OUTPUT ${CONFIG_OUTPUT})<br>
>>>>> >> + else()<br>
>>>>> >> + string(REPLACE ";" " " CONFIG_COMMAND_STR<br>
>>>>> >> "${CONFIG_COMMAND}")<br>
>>>>> >> + message(STATUS "${CONFIG_COMMAND_STR}")<br>
>>>>> >> + message(FATAL_ERROR "llvm-config failed with status<br>
>>>>> >> ${HAD_ERROR}")<br>
>>>>> >> + endif()<br>
>>>>> >> +<br>
>>>>> >> + list(GET CONFIG_OUTPUT 0 INCLUDE_DIR)<br>
>>>>> >> + list(GET CONFIG_OUTPUT 1 LLVM_OBJ_ROOT)<br>
>>>>> >> + list(GET CONFIG_OUTPUT 2 MAIN_SRC_DIR)<br>
>>>>> >> +<br>
>>>>> >> + set(LLVM_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to<br>
>>>>> >> llvm/include")<br>
>>>>> >> + set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to \
LLVM<br> >>>>> >> build<br>
>>>>> >> tree")<br>
>>>>> >> + set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to \
LLVM<br> >>>>> >> source<br>
>>>>> >> tree")<br>
>>>>> >> + set(LLVM_CMAKE_PATH \
"${LLVM_BINARY_DIR}/share/llvm/cmake")<br> >>>>> >> + else()<br>
>>>>> >> + message(FATAL_ERROR "llvm-config not found and<br>
>>>>> >> LLVM_MAIN_SRC_DIR not<br>
>>>>> >> defined. "<br>
>>>>> >> + "Reconfigure with<br>
>>>>> >> -DLLVM_CONFIG=path/to/llvm-config "<br>
>>>>> >> + "or \
-DLLVM_PATH=path/to/llvm-source-root.")<br> >>>>> >> + endif()<br>
>>>>> >> +<br>
>>>>> >> + if (NOT EXISTS ${LLVM_MAIN_SRC_DIR})<br>
>>>>> >> + message(FATAL_ERROR "Not found: ${LLVM_MAIN_SRC_DIR}")<br>
>>>>> >> + endif()<br>
>>>>> >> +<br>
>>>>> >> + if(NOT EXISTS ${LLVM_CMAKE_PATH})<br>
>>>>> >> + message(FATAL_ERROR "Not found: ${LLVM_CMAKE_PATH}")<br>
>>>>> >> + endif()<br>
>>>>> >> +<br>
>>>>> >> + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")<br>
>>>>> >> + list(APPEND CMAKE_MODULE_PATH<br>
>>>>> >> "${LLVM_MAIN_SRC_DIR}/cmake/modules")<br>
>>>>> >> +<br>
>>>>> >> +<br>
>>>>> >> + if(LLVM_LIT)<br>
>>>>> >> + # Define the default arguments to use with 'lit', and an \
option<br> >>>>> >> for<br>
>>>>> >> the user<br>
>>>>> >> + # to override.<br>
>>>>> >> + set(LIT_ARGS_DEFAULT "-sv --show-xfail \
--show-unsupported")<br> >>>>> >> + if (MSVC OR XCODE)<br>
>>>>> >> + set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} \
--no-progress-bar")<br> >>>>> >> + endif()<br>
>>>>> >> + set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING \
"Default<br> >>>>> >> options<br>
>>>>> >> for lit")<br>
>>>>> >> +<br>
>>>>> >> + # On Win32 hosts, provide an option to specify the path to the<br>
>>>>> >> GnuWin32 tools.<br>
>>>>> >> + if( WIN32 AND NOT CYGWIN )<br>
>>>>> >> + set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to \
GnuWin32<br> >>>>> >> tools")<br>
>>>>> >> + endif()<br>
>>>>> >> + else()<br>
>>>>> >> + set(LLVM_INCLUDE_TESTS OFF)<br>
>>>>> >> + endif()<br>
>>>>> >> +<br>
>>>>> >> + include(AddLLVM) # Include the LLVM CMake functions.<br>
>>>>> >> + include(HandleLLVMOptions)<br>
>>>>> >> + set(LIBCXX_BUILT_STANDALONE 1)<br>
>>>>> >> +else()<br>
>>>>> >> + set(LLVM_MAIN_SRC_DIR "${CMAKE_SOURCE_DIR}" CACHE PATH \
"Path to<br> >>>>> >> LLVM<br>
>>>>> >> source tree")<br>
>>>>> >> + set(LLVM_LIT "${CMAKE_SOURCE_DIR}/utils/lit/lit.py")<br>
>>>>> >> +endif()<br>
>>>>> >><br>
>>>>> >> Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake<br>
>>>>> >> URL:<br>
>>>>> >><br>
</div></div><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_cmak \
e_Modules_HandleLibCXXABI.cmake-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZ \
cy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=XkmhX26fxOOQm21loG0dMpj66xxa3O7Gne_PTvHyMPk&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake (original)<br> >>>>> \
>> +++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Wed Jul 29<br> >>>>> \
>> 16:07:28<br> >>>>> >> 2015<br>
>>>>> >> @@ -58,6 +58,21 @@ macro(setup_abi_lib abidefines abilib ab<br>
>>>>> >><br>
>>>>> >> endmacro()<br>
>>>>> >><br>
>>>>> >> +# Setup the default options if LIBCXX_CXX_ABI is not specified.<br>
>>>>> >> +if (NOT LIBCXX_CXX_ABI)<br>
>>>>> >> + if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND<br>
>>>>> >> + IS_DIRECTORY \
"${CMAKE_SOURCE_DIR}/projects/libcxxabi")<br> >>>>> >> + \
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")<br> >>>>> >> + \
set(LIBCXX_CXX_ABI_INCLUDE_PATHS<br> >>>>> >> \
"${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")<br> >>>>> >> + \
set(LIBCXX_CXX_ABI_INTREE 1)<br> >>>>> >> + else ()<br>
>>>>> >> + set(LIBCXX_CXX_ABI_LIBNAME "none")<br>
>>>>> >> + endif ()<br>
>>>>> >> +else ()<br>
>>>>> >> + set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")<br>
>>>>> >> +endif ()<br>
>>>>> >> +<br>
>>>>> >> +# Configure based on the selected ABI library.<br>
>>>>> >> if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" \
OR<br> >>>>> >> "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL \
"libsupc++")<br> >>>>> >> set(_LIBSUPCXX_INCLUDE_FILES<br>
>>>>> >><br>
>>>>> >> Added: libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake<br>
>>>>> >> URL:<br>
>>>>> >><br>
</div></div><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_cmak \
e_Modules_HandleLibcxxFlags.cmake-3Frev-3D243574-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9K \
vKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=C7TI1HXzw-xyqng2vZSZCg2zlan35HnKGBJglLeRMr0&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake?rev=243574&view=auto</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake (added)<br> >>>>> >> \
+++ libcxx/trunk/cmake/Modules/HandleLibcxxFlags.cmake Wed Jul 29<br> >>>>> >> \
16:07:28<br> >>>>> >> 2015<br>
>>>>> >> @@ -0,0 +1,147 @@<br>
>>>>> >> +# HandleLibcxxFlags - A set of macros used to setup the flags used<br>
>>>>> >> to<br>
>>>>> >> compile<br>
>>>>> >> +# and link libc++. These macros add flags to the following CMake<br>
>>>>> >> variables.<br>
>>>>> >> +# - LIBCXX_COMPILE_FLAGS: flags used to compile libc++<br>
>>>>> >> +# - LIBCXX_LINK_FLAGS: flags used to link libc++<br>
>>>>> >> +# - LIBCXX_LIBRARIES: libraries to link libc++ to.<br>
>>>>> >> +<br>
>>>>> >> +include(CheckCXXCompilerFlag)<br>
>>>>> >> +<br>
>>>>> >> +unset(add_flag_if_supported)<br>
>>>>> >> +<br>
>>>>> >> +# Mangle the name of a compiler flag into a valid CMake identifier.<br>
>>>>> >> +# Ex: --std=c++11 -> STD_EQ_CXX11<br>
>>>>> >> +macro(mangle_name str output)<br>
>>>>> >> + string(STRIP "${str}" strippedStr)<br>
>>>>> >> + string(REGEX REPLACE "^/" "" strippedStr \
"${strippedStr}")<br> >>>>> >> + string(REGEX REPLACE "^-+" \
"" strippedStr "${strippedStr}")<br> >>>>> >> + string(REGEX \
REPLACE "-+$" "" strippedStr "${strippedStr}")<br> >>>>> \
>> + string(REPLACE "-" "_" strippedStr "${strippedStr}")<br> \
>>>>> >> + string(REPLACE "=" "_EQ_" strippedStr \
"${strippedStr}")<br> >>>>> >> + string(REPLACE "+" \
"X" strippedStr "${strippedStr}")<br> >>>>> >> + \
string(TOUPPER "${strippedStr}" ${output})<br> >>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Remove a list of flags from all CMake variables that affect<br>
>>>>> >> compile<br>
>>>>> >> flags.<br>
>>>>> >> +# This can be used to remove unwanted flags specified on the<br>
>>>>> >> command line<br>
>>>>> >> +# or added in other parts of LLVM's cmake configuration.<br>
>>>>> >> +macro(remove_flags)<br>
>>>>> >> + foreach(var ${ARGN})<br>
>>>>> >> + string(REPLACE "${var}" "" CMAKE_CXX_FLAGS<br>
>>>>> >> "${CMAKE_CXX_FLAGS}")<br>
>>>>> >> + string(REPLACE "${var}" "" CMAKE_C_FLAGS \
"${CMAKE_C_FLAGS}")<br> >>>>> >> + string(REPLACE "${var}" \
"" CMAKE_EXE_LINKER_FLAGS<br> >>>>> >> \
"${CMAKE_EXE_LINKER_FLAGS}")<br> >>>>> >> + string(REPLACE \
"${var}" "" CMAKE_SHARED_LINKER_FLAGS<br> >>>>> >> \
"${CMAKE_SHARED_LINKER_FLAGS}")<br> >>>>> >> + string(REPLACE \
"${var}" "" CMAKE_SHARED_MODULE_FLAGS<br> >>>>> >> \
"${CMAKE_SHARED_MODULE_FLAGS}")<br> >>>>> >> + \
remove_definitions(${var})<br> >>>>> >> + endforeach()<br>
>>>>> >> +endmacro(remove_flags)<br>
>>>>> >> +<br>
>>>>> >> +# Add a macro definition if condition is true.<br>
>>>>> >> +macro(define_if condition def)<br>
>>>>> >> + if (${condition})<br>
>>>>> >> + add_definitions(${def})<br>
>>>>> >> + endif()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Add a macro definition if condition is not true.<br>
>>>>> >> +macro(define_if_not condition def)<br>
>>>>> >> + if (NOT ${condition})<br>
>>>>> >> + add_definitions(${def})<br>
>>>>> >> + endif()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Add a specified list of flags to both 'LIBCXX_COMPILE_FLAGS' \
and<br> >>>>> >> +# 'LIBCXX_LINK_FLAGS'.<br>
>>>>> >> +macro(add_flags)<br>
>>>>> >> + foreach(value ${ARGN})<br>
>>>>> >> + list(APPEND LIBCXX_COMPILE_FLAGS ${value})<br>
>>>>> >> + list(APPEND LIBCXX_LINK_FLAGS ${value})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# If the specified 'condition' is true then add a list of flags \
to<br> >>>>> >> both<br>
>>>>> >> +# 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS'.<br>
>>>>> >> +macro(add_flags_if condition)<br>
>>>>> >> + if (${condition})<br>
>>>>> >> + add_flags(${ARGN})<br>
>>>>> >> + endif()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Add each flag in the list to LIBCXX_COMPILE_FLAGS and<br>
>>>>> >> LIBCXX_LINK_FLAGS<br>
>>>>> >> +# if that flag is supported by the current compiler.<br>
>>>>> >> +macro(add_flags_if_supported)<br>
>>>>> >> + foreach(flag ${ARGN})<br>
>>>>> >> + mangle_name("${flag}" flagname)<br>
>>>>> >> + check_cxx_compiler_flag("${flag}"<br>
>>>>> >> "LIBCXX_SUPPORTS_${flagname}_FLAG")<br>
>>>>> >> + add_flags_if(LIBCXX_SUPPORTS_${flagname}_FLAG ${flag})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Add a list of flags to 'LIBCXX_COMPILE_FLAGS'.<br>
>>>>> >> +macro(add_compile_flags)<br>
>>>>> >> + foreach(f ${ARGN})<br>
>>>>> >> + list(APPEND LIBCXX_COMPILE_FLAGS ${f})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# If 'condition' is true then add the specified list of flags \
to<br> >>>>> >> +# 'LIBCXX_COMPILE_FLAGS'<br>
>>>>> >> +macro(add_compile_flags_if condition)<br>
>>>>> >> + if (${condition})<br>
>>>>> >> + add_compile_flags(${ARGN})<br>
>>>>> >> + endif()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# For each specified flag, add that flag to \
'LIBCXX_COMPILE_FLAGS'<br> >>>>> >> if the<br>
>>>>> >> +# flag is supported by the C++ compiler.<br>
>>>>> >> +macro(add_compile_flags_if_supported)<br>
>>>>> >> + foreach(flag ${ARGN})<br>
>>>>> >> + mangle_name("${flag}" flagname)<br>
>>>>> >> + check_cxx_compiler_flag("-Werror ${flag}"<br>
>>>>> >> "LIBCXX_SUPPORTS_${flagname}_FLAG")<br>
>>>>> >> + add_compile_flags_if(LIBCXX_SUPPORTS_${flagname}_FLAG<br>
>>>>> >> ${flag})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Add a list of flags to 'LIBCXX_LINK_FLAGS'.<br>
>>>>> >> +macro(add_link_flags)<br>
>>>>> >> + foreach(f ${ARGN})<br>
>>>>> >> + list(APPEND LIBCXX_LINK_FLAGS ${f})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# If 'condition' is true then add the specified list of flags \
to<br> >>>>> >> +# 'LIBCXX_LINK_FLAGS'<br>
>>>>> >> +macro(add_link_flags_if condition)<br>
>>>>> >> + if (${condition})<br>
>>>>> >> + add_link_flags(${ARGN})<br>
>>>>> >> + endif()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# For each specified flag, add that flag to 'LIBCXX_LINK_FLAGS' \
if<br> >>>>> >> the<br>
>>>>> >> +# flag is supported by the C++ compiler.<br>
>>>>> >> +macro(add_link_flags_if_supported)<br>
>>>>> >> + foreach(flag ${ARGN})<br>
>>>>> >> + mangle_name("${flag}" flagname)<br>
>>>>> >> + check_cxx_compiler_flag("${flag}"<br>
>>>>> >> "LIBCXX_SUPPORTS_${flagname}_FLAG")<br>
>>>>> >> + add_link_flags_if(LIBCXX_SUPPORTS_${flagname}_FLAG ${flag})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Add a list of libraries or link flags to 'LIBCXX_LIBRARIES'.<br>
>>>>> >> +macro(add_library_flags)<br>
>>>>> >> + foreach(lib ${ARGN})<br>
>>>>> >> + list(APPEND LIBCXX_LIBRARIES ${lib})<br>
>>>>> >> + endforeach()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# if 'condition' is true then add the specified list of \
libraries<br> >>>>> >> and<br>
>>>>> >> flags<br>
>>>>> >> +# to 'LIBCXX_LIBRARIES'.<br>
>>>>> >> +macro(add_library_flags_if condition)<br>
>>>>> >> + if(${condition})<br>
>>>>> >> + add_library_flags(${ARGN})<br>
>>>>> >> + endif()<br>
>>>>> >> +endmacro()<br>
>>>>> >> +<br>
>>>>> >> +# Turn a comma separated CMake list into a space separated string.<br>
>>>>> >> +macro(split_list listname)<br>
>>>>> >> + string(REPLACE ";" " " ${listname} \
"${${listname}}")<br> >>>>> >> +endmacro()<br>
>>>>> >><br>
>>>>> >> Modified: libcxx/trunk/cmake/config-ix.cmake<br>
>>>>> >> URL:<br>
>>>>> >><br>
</div></div><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_cmak \
e_config-2Dix.cmake-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPl \
ktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=clqoIwQvThEZYFh5u8E0MBAJ1Eu-8NuGSbvA3zL_rOo&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/config-ix.cmake?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/cmake/config-ix.cmake (original)<br> >>>>> >> +++ \
libcxx/trunk/cmake/config-ix.cmake Wed Jul 29 16:07:28 2015<br> >>>>> >> @@ -2,23 \
+2,7 @@ include(CheckLibraryExists)<br> >>>>> >> include(CheckCXXCompilerFlag)<br>
>>>>> >><br>
>>>>> >> # Check compiler flags<br>
>>>>> >> -check_cxx_compiler_flag(-std=c++11<br>
>>>>> >> LIBCXX_HAS_STDCXX11_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-std=c++1y<br>
>>>>> >> LIBCXX_HAS_STDCXX1Y_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-fPIC<br>
>>>>> >> LIBCXX_HAS_FPIC_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-fno-omit-frame-pointer<br>
>>>>> >> LIBCXX_HAS_FNO_OMIT_FRAME_POINTER_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-nodefaultlibs<br>
>>>>> >> LIBCXX_HAS_NODEFAULTLIBS_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-nostdinc++<br>
>>>>> >> LIBCXX_HAS_NOSTDINCXX_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-Wall<br>
>>>>> >> LIBCXX_HAS_WALL_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-W \
LIBCXX_HAS_W_FLAG)<br> >>>>> >> -check_cxx_compiler_flag(-Wno-unused-parameter<br>
>>>>> >> LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-Wwrite-strings<br>
>>>>> >> LIBCXX_HAS_WWRITE_STRINGS_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-Wno-long-long<br>
>>>>> >> LIBCXX_HAS_WNO_LONG_LONG_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-pedantic<br>
>>>>> >> LIBCXX_HAS_PEDANTIC_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-Werror<br>
>>>>> >> LIBCXX_HAS_WERROR_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-Wno-error<br>
>>>>> >> LIBCXX_HAS_WNO_ERROR_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-fno-exceptions<br>
>>>>> >> LIBCXX_HAS_FNO_EXCEPTIONS_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-fno-rtti<br>
>>>>> >> LIBCXX_HAS_FNO_RTTI_FLAG)<br>
>>>>> >> -check_cxx_compiler_flag(-gline-tables-only<br>
>>>>> >> LIBCXX_HAS_GLINE_TABLES_ONLY_FLAG)<br>
>>>>> >> +<br>
>>>>> >> check_cxx_compiler_flag(/WX \
LIBCXX_HAS_WX_FLAG)<br> >>>>> >> check_cxx_compiler_flag(/WX-<br>
>>>>> >> LIBCXX_HAS_NO_WX_FLAG)<br>
>>>>> >> check_cxx_compiler_flag(/EHsc<br>
>>>>> >> LIBCXX_HAS_EHSC_FLAG)<br>
>>>>> >> @@ -26,6 +10,7 @@ check_cxx_compiler_flag(/EHs-<br>
>>>>> >> check_cxx_compiler_flag(/EHa-<br>
>>>>> >> LIBCXX_HAS_NO_EHA_FLAG)<br>
>>>>> >> check_cxx_compiler_flag(/GR-<br>
>>>>> >> LIBCXX_HAS_NO_GR_FLAG)<br>
>>>>> >><br>
>>>>> >> +<br>
>>>>> >> # Check libraries<br>
>>>>> >> check_library_exists(pthread pthread_create ""<br>
>>>>> >> LIBCXX_HAS_PTHREAD_LIB)<br>
>>>>> >> check_library_exists(c printf "" LIBCXX_HAS_C_LIB)<br>
>>>>> >><br>
>>>>> >> Modified: libcxx/trunk/lib/CMakeLists.txt<br>
>>>>> >> URL:<br>
>>>>> >><br>
</div></div><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_lib_ \
CMakeLists.txt-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ& \
r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=NVDjpX-d7VybNIIDrNFqWFneFc3hUEDkO7_s7BWajX0&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/lib/CMakeLists.txt (original)<br> >>>>> >> +++ \
libcxx/trunk/lib/CMakeLists.txt Wed Jul 29 16:07:28 2015<br> >>>>> >> @@ -25,48 \
+25,23 @@ if (MSVC_IDE OR XCODE)<br> >>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> if (LIBCXX_ENABLE_SHARED)<br>
>>>>> >> - add_library(cxx SHARED<br>
>>>>> >> - ${LIBCXX_SOURCES}<br>
>>>>> >> - ${LIBCXX_HEADERS}<br>
>>>>> >> - )<br>
>>>>> >> + add_library(cxx SHARED ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})<br>
>>>>> >> else()<br>
>>>>> >> - add_library(cxx STATIC<br>
>>>>> >> - ${LIBCXX_SOURCES}<br>
>>>>> >> - ${LIBCXX_HEADERS}<br>
>>>>> >> - )<br>
>>>>> >> -endif()<br>
>>>>> >> -<br>
>>>>> >> -#if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to the<br>
>>>>> >> search path.<br>
>>>>> >> -if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH)<br>
>>>>> >> - target_link_libraries(cxx \
"-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")<br> >>>>> >> + add_library(cxx \
STATIC ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})<br> >>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> if (DEFINED LIBCXX_CXX_ABI_DEPS)<br>
>>>>> >> add_dependencies(cxx LIBCXX_CXX_ABI_DEPS)<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> -set(libraries "")<br>
>>>>> >> -if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)<br>
>>>>> >> - # TODO(ericwf): Remove these GNU specific linker flags and let<br>
>>>>> >> CMake<br>
>>>>> >> do the<br>
>>>>> >> - # configuration. This will be more portable.<br>
>>>>> >> - list(APPEND libraries "-Wl,--whole-archive" \
"-Wl,-Bstatic")<br> >>>>> >> - list(APPEND libraries \
"${LIBCXX_CXX_ABI_LIBRARY}")<br> >>>>> >> - list(APPEND libraries \
"-Wl,-Bdynamic" "-Wl,--no-whole-archive")<br> >>>>> >> \
-else()<br> >>>>> >> - list(APPEND libraries \
"${LIBCXX_CXX_ABI_LIBRARY}")<br> >>>>> >> -endif()<br>
>>>>> >> +#if LIBCXX_CXX_ABI_LIBRARY_PATH is defined we want to add it to the<br>
>>>>> >> search path.<br>
>>>>> >> +add_link_flags_if(LIBCXX_CXX_ABI_LIBRARY_PATH<br>
>>>>> >> "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")<br>
>>>>> >><br>
>>>>> >> -# Generate library list.<br>
>>>>> >> -append_if(libraries LIBCXX_HAS_PTHREAD_LIB pthread)<br>
>>>>> >> -append_if(libraries LIBCXX_HAS_C_LIB c)<br>
>>>>> >> -append_if(libraries LIBCXX_HAS_M_LIB m)<br>
>>>>> >> -append_if(libraries LIBCXX_HAS_RT_LIB rt)<br>
>>>>> >> -append_if(libraries LIBCXX_HAS_GCC_S_LIB gcc_s)<br>
>>>>> >> +add_library_flags_if(LIBCXX_COVERAGE_LIBRARY<br>
>>>>> >> "${LIBCXX_COVERAGE_LIBRARY}")<br>
>>>>> >><br>
>>>>> >> -if (LIBCXX_COVERAGE_LIBRARY)<br>
>>>>> >> - target_link_libraries(cxx ${LIBCXX_COVERAGE_LIBRARY})<br>
>>>>> >> -endif()<br>
>>>>> >> -target_link_libraries(cxx ${libraries})<br>
>>>>> >> +add_library_flags_if(LIBCXX_ENABLE_STATIC_ABI_LIBRARY<br>
>>>>> >> "-Wl,--whole-archive" "-Wl,-Bstatic")<br>
>>>>> >> +add_library_flags("${LIBCXX_CXX_ABI_LIBRARY}")<br>
>>>>> >> +add_library_flags_if(LIBCXX_ENABLE_STATIC_ABI_LIBRARY<br>
>>>>> >> "-Wl,-Bdynamic"<br>
>>>>> >> "-Wl,--no-whole-archive")<br>
>>>>> >><br>
>>>>> >> if (APPLE AND LLVM_USE_SANITIZER)<br>
>>>>> >> if ("${LLVM_USE_SANITIZER}" STREQUAL \
"Address")<br> >>>>> >> @@ -89,15 +64,21 @@ if (APPLE AND \
LLVM_USE_SANITIZER)<br> >>>>> >> set(LIBCXX_SANITIZER_LIBRARY \
"${LIBDIR}/${LIBFILE}")<br> >>>>> >> set(LIBCXX_SANITIZER_LIBRARY \
"${LIBCXX_SANITIZER_LIBRARY}"<br> >>>>> >> PARENT_SCOPE)<br>
>>>>> >> message(STATUS "Manually linking compiler-rt library:<br>
>>>>> >> ${LIBCXX_SANITIZER_LIBRARY}")<br>
>>>>> >> - target_link_libraries(cxx \
"${LIBCXX_SANITIZER_LIBRARY}")<br> >>>>> >> - \
target_link_libraries(cxx "-Wl,-rpath,${LIBDIR}")<br> >>>>> >> + \
add_library_flags("${LIBCXX_SANITIZER_LIBRARY}")<br> >>>>> >> + \
add_link_flags("-Wl,-rpath,${LIBDIR}")<br> >>>>> >> endif()<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> +# Generate library list.<br>
>>>>> >> +add_library_flags_if(LIBCXX_HAS_PTHREAD_LIB pthread)<br>
>>>>> >> +add_library_flags_if(LIBCXX_HAS_C_LIB c)<br>
>>>>> >> +add_library_flags_if(LIBCXX_HAS_M_LIB m)<br>
>>>>> >> +add_library_flags_if(LIBCXX_HAS_RT_LIB rt)<br>
>>>>> >> +add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s)<br>
>>>>> >><br>
>>>>> >> # Setup flags.<br>
>>>>> >> -append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC)<br>
>>>>> >> -append_if(LIBCXX_LINK_FLAGS LIBCXX_HAS_NODEFAULTLIBS_FLAG<br>
>>>>> >> -nodefaultlibs)<br>
>>>>> >> +add_flags_if_supported(-fPIC)<br>
>>>>> >> +add_link_flags_if_supported(-nodefaultlibs)<br>
>>>>> >><br>
>>>>> >> if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" \
OR<br> >>>>> >> LIBCXX_CXX_ABI_LIBNAME STREQUAL \
"none"))<br> >>>>> >> @@ -106,8 +87,8 @@ if ( APPLE AND \
(LIBCXX_CXX_ABI_LIBNAME S<br> >>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )<br>
>>>>> >> - list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")<br>
>>>>> >> - list(APPEND LIBCXX_LINK_FLAGS<br>
>>>>> >> + add_definitions(-D__STRICT_ANSI__)<br>
>>>>> >> + add_link_flags(<br>
>>>>> >> "-compatibility_version 1"<br>
>>>>> >> "-current_version 1"<br>
>>>>> >> "-install_name /usr/lib/libc++.1.dylib"<br>
>>>>> >> @@ -129,7 +110,7 @@ if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME S<br>
>>>>> >> set (OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib<br>
>>>>> >><br>
>>>>> >> \
-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")<br>
>>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> - list(APPEND LIBCXX_LINK_FLAGS<br>
>>>>> >> + add_link_flags(<br>
>>>>> >> "-compatibility_version 1"<br>
>>>>> >> "-install_name /usr/lib/libc++.1.dylib"<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"<br> \
>>>>> >> @@ -139,8 +120,9 @@ if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME S<br> \
>>>>> >> endif()<br> >>>>> >> endif()<br>
>>>>> >><br>
>>>>> >> -string(REPLACE ";" " " LIBCXX_COMPILE_FLAGS<br>
>>>>> >> "${LIBCXX_COMPILE_FLAGS}")<br>
>>>>> >> -string(REPLACE ";" " " LIBCXX_LINK_FLAGS \
"${LIBCXX_LINK_FLAGS}")<br> >>>>> >> +target_link_libraries(cxx \
${LIBCXX_LIBRARIES})<br> >>>>> >> +split_list(LIBCXX_COMPILE_FLAGS)<br>
>>>>> >> +split_list(LIBCXX_LINK_FLAGS)<br>
>>>>> >><br>
>>>>> >> set_target_properties(cxx<br>
>>>>> >> PROPERTIES<br>
>>>>> >><br>
>>>>> >> Modified: libcxx/trunk/test/CMakeLists.txt<br>
>>>>> >> URL:<br>
>>>>> >><br>
</div></div><div><div class="h5">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_test \
_CMakeLists.txt-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ \
&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=2PSU4E1dH4Ob3o0jjPCMGLzBzB62UA9BAn9NDSFe5Bc&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/CMakeLists.txt?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/test/CMakeLists.txt (original)<br> >>>>> >> +++ \
libcxx/trunk/test/CMakeLists.txt Wed Jul 29 16:07:28 2015<br> >>>>> >> @@ -6,84 \
+6,47 @@ macro(pythonize_bool var)<br> >>>>> >> endif()<br>
>>>>> >> endmacro()<br>
>>>>> >><br>
>>>>> >> -set(LIT_EXECUTABLE "" CACHE FILEPATH "Path to LLVM's \
llvm-lit.")<br> >>>>> >> +set(LIBCXX_LIT_VARIANT "libcxx" CACHE \
STRING<br> >>>>> >> + "Configuration variant to use for LIT.")<br>
>>>>> >><br>
>>>>> >> -if(LIBCXX_BUILT_STANDALONE)<br>
>>>>> >> - # Make sure we can use the console pool for recent cmake and<br>
>>>>> >> ninja ><br>
>>>>> >> 1.5<br>
>>>>> >> - if(CMAKE_VERSION VERSION_LESS 3.1.20141117)<br>
>>>>> >> - set(cmake_3_2_USES_TERMINAL)<br>
>>>>> >> - else()<br>
>>>>> >> - set(cmake_3_2_USES_TERMINAL USES_TERMINAL)<br>
>>>>> >> - endif()<br>
>>>>> >> -else()<br>
>>>>> >> - include(FindPythonInterp)<br>
>>>>> >> - if(PYTHONINTERP_FOUND)<br>
>>>>> >> - set(LIT_EXECUTABLE<br>
>>>>> >> - ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/utils/lit/lit.py)<br>
>>>>> >> - else()<br>
>>>>> >> - message(WARNING "Could not find Python, cannot set<br>
>>>>> >> LIT_EXECUTABLE.")<br>
>>>>> >> - endif()<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_RTTI)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_SHARED)<br>
>>>>> >> +pythonize_bool(LIBCXX_BUILD_32_BITS)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_STDIN)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_STDOUT)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_THREADS)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS)<br>
>>>>> >> +pythonize_bool(LIBCXX_ENABLE_MONOTONIC_CLOCK)<br>
>>>>> >> +pythonize_bool(LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> +pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)<br>
>>>>> >> +<br>
>>>>> >> +# The tests shouldn't link to any ABI library when it has been<br>
>>>>> >> linked<br>
>>>>> >> into<br>
>>>>> >> +# libc++ statically.<br>
>>>>> >> +if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)<br>
>>>>> >> + set(LIBCXX_CXX_ABI_LIBNAME "none")<br>
>>>>> >> endif()<br>
>>>>> >> -<br>
>>>>> >> -if (LIT_EXECUTABLE)<br>
>>>>> >> - set(LIT_ARGS_DEFAULT "-sv --show-unsupported \
--show-xfail")<br> >>>>> >> - if (MSVC OR XCODE)<br>
>>>>> >> - set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} \
--no-progress-bar")<br> >>>>> >> - endif()<br>
>>>>> >> - set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"<br>
>>>>> >> - CACHE STRING "Default options for lit")<br>
>>>>> >> - set(LIT_ARGS "${LLVM_LIT_ARGS}")<br>
>>>>> >> - separate_arguments(LIT_ARGS)<br>
>>>>> >> -<br>
>>>>> >> - set(LIBCXX_LIT_VARIANT "libcxx" CACHE STRING<br>
>>>>> >> - "Configuration variant to use for LIT.")<br>
>>>>> >> -<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_EXCEPTIONS)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_RTTI)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_SHARED)<br>
>>>>> >> - pythonize_bool(LIBCXX_BUILD_32_BITS)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_STDIN)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_STDOUT)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_THREADS)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS)<br>
>>>>> >> - pythonize_bool(LIBCXX_ENABLE_MONOTONIC_CLOCK)<br>
>>>>> >> - pythonize_bool(LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> - pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)<br>
>>>>> >> -<br>
>>>>> >> - # The tests shouldn't link to any ABI library when it has been<br>
>>>>> >> linked<br>
>>>>> >> into<br>
>>>>> >> - # libc++ statically.<br>
>>>>> >> - if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)<br>
>>>>> >> - set(LIBCXX_CXX_ABI_LIBNAME "none")<br>
>>>>> >> - endif()<br>
>>>>> >> - set(LIBCXX_TARGET_INFO "libcxx.test.target_info.LocalTI" \
CACHE<br> >>>>> >> STRING<br>
>>>>> >> - "TargetInfo to use when setting up test \
environment.")<br> >>>>> >> - set(LIBCXX_EXECUTOR "None" CACHE \
STRING<br> >>>>> >> - "Executor to use when running tests.")<br>
>>>>> >> -<br>
>>>>> >> - set(AUTO_GEN_COMMENT "## Autogenerated by libcxx<br>
>>>>> >> configuration.\n# Do<br>
>>>>> >> not edit!")<br>
>>>>> >> -<br>
>>>>> >> - configure_file(<br>
</div></div>>>>>> >> - ${CMAKE_CURRENT_SOURCE_DIR}/<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.in&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=LDfQXxz0_2T4eAZr6s8uuSpe8_AIjA18L6SSOxO38r8&e=" \
rel="noreferrer" target="_blank">lit.site.cfg.in</a><br> <div><div class="h5">>>>>><br>
>>>>> >><br>
>>>>> >> - ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg<br>
>>>>> >> - @ONLY)<br>
>>>>> >> -<br>
>>>>> >> - add_custom_target(check-libcxx<br>
>>>>> >> - COMMAND ${LIT_EXECUTABLE}<br>
>>>>> >> - ${LIT_ARGS}<br>
>>>>> >> - ${CMAKE_CURRENT_BINARY_DIR}<br>
>>>>> >> - DEPENDS cxx<br>
>>>>> >> - COMMENT "Running libcxx tests"<br>
>>>>> >> - ${cmake_3_2_USES_TERMINAL})<br>
>>>>> >> -<br>
>>>>> >> - if (LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> - include(CodeCoverage)<br>
>>>>> >> - set(output_dir "${CMAKE_CURRENT_BINARY_DIR}/coverage")<br>
>>>>> >> - set(capture_dirs<br>
>>>>> >> \
"${LIBCXX_LIB_CMAKEFILES_DIR}/cxx.dir/;${CMAKE_CURRENT_BINARY_DIR}")<br> >>>>> \
>> - set(extract_dirs<br> >>>>> >> \
"${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")<br> >>>>> >> - \
setup_lcov_test_target_coverage("cxx" "${output_dir}"<br> >>>>> \
>> "${capture_dirs}" "${extract_dirs}")<br> >>>>> >> - \
endif()<br> >>>>> >> -else()<br>
>>>>> >> - message(WARNING<br>
>>>>> >> - "LIT_EXECUTABLE not set, no check-libcxx target will \
be<br> >>>>> >> available!")<br>
>>>>> >> +set(LIBCXX_TARGET_INFO "libcxx.test.target_info.LocalTI" \
CACHE<br> >>>>> >> STRING<br>
>>>>> >> + "TargetInfo to use when setting up test environment.")<br>
>>>>> >> +set(LIBCXX_EXECUTOR "None" CACHE STRING<br>
>>>>> >> + "Executor to use when running tests.")<br>
>>>>> >> +<br>
>>>>> >> +set(AUTO_GEN_COMMENT "## Autogenerated by libcxx \
configuration.\n#<br> >>>>> >> Do not<br>
>>>>> >> edit!")<br>
>>>>> >> +<br>
>>>>> >> +configure_file(<br>
</div></div>>>>>> >> + ${CMAKE_CURRENT_SOURCE_DIR}/<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.in&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=LDfQXxz0_2T4eAZr6s8uuSpe8_AIjA18L6SSOxO38r8&e=" \
rel="noreferrer" target="_blank">lit.site.cfg.in</a><br> <span class="">>>>>> >> + \
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg<br> >>>>> >> + @ONLY)<br>
>>>>> >> +<br>
>>>>> >> +add_lit_testsuite(check-libcxx "Running libcxx tests"<br>
>>>>> >> + ${CMAKE_CURRENT_BINARY_DIR}<br>
>>>>> >> + DEPENDS cxx)<br>
>>>>> >> +<br>
>>>>> >> +if (LIBCXX_GENERATE_COVERAGE)<br>
>>>>> >> + include(CodeCoverage)<br>
>>>>> >> + set(output_dir "${CMAKE_CURRENT_BINARY_DIR}/coverage")<br>
>>>>> >> + set(capture_dirs<br>
>>>>> >> \
"${LIBCXX_LIB_CMAKEFILES_DIR}/cxx.dir/;${CMAKE_CURRENT_BINARY_DIR}")<br> >>>>> \
>> + set(extract_dirs<br> >>>>> >> \
"${LIBCXX_SOURCE_DIR}/include;${LIBCXX_SOURCE_DIR}/src")<br> >>>>> >> + \
setup_lcov_test_target_coverage("cxx" "${output_dir}"<br> >>>>> \
>> "${capture_dirs}"<br> >>>>> >> "${extract_dirs}")<br>
>>>>> >> endif()<br>
>>>>> >><br>
</span><span class="">>>>>> >> Modified: libcxx/trunk/test/<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.in&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=LDfQXxz0_2T4eAZr6s8uuSpe8_AIjA18L6SSOxO38r8&e=" \
rel="noreferrer" target="_blank">lit.site.cfg.in</a><br> >>>>> >> URL:<br>
>>>>> >><br>
>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_test \
_lit.site.cfg.in-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=PhGAXQT5FgzNZLkAUJLP1vJ5oGMI2iWIwXlLlcWetsc&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.site.cfg.in?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/test/<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.in&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=LDfQXxz0_2T4eAZr6s8uuSpe8_AIjA18L6SSOxO38r8&e=" \
rel="noreferrer" target="_blank">lit.site.cfg.in</a> (original)<br> </span>>>>>> >> \
+++ libcxx/trunk/test/<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lit.site.cfg.in&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktO \
Q&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=LDfQXxz0_2T4eAZr6s8uuSpe8_AIjA18L6SSOxO38r8&e=" \
rel="noreferrer" target="_blank">lit.site.cfg.in</a> Wed Jul 29 16:07:28 2015<br> <span \
class="">>>>>> >> @@ -1,6 +1,5 @@<br> >>>>> >> \
@AUTO_GEN_COMMENT@<br> >>>>> >> config.cxx_under_test = \
"@LIBCXX_COMPILER@"<br> >>>>> >> -config.std \
= "@LIBCXX_STD_VERSION@"<br> >>>>> >> config.libcxx_src_root \
= "@LIBCXX_SOURCE_DIR@"<br> >>>>> >> config.libcxx_obj_root \
= "@LIBCXX_BINARY_DIR@"<br> >>>>> >> config.cxx_library_root \
= "@LIBCXX_LIBRARY_DIR@"<br> >>>>> >><br>
>>>>> >> Modified: libcxx/trunk/www/index.html<br>
>>>>> >> URL:<br>
>>>>> >><br>
</span><span class="">>>>>> >> <a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_www_ \
index.html-3Frev-3D243574-26r1-3D243573-26r2-3D243574-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BS \
qEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=_nIFr9ARZ9GJcgSOvNMOw2DJIXPscy75U7s0lNlbhLE&e=" \
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/index.html?rev=243574&r1=243573&r2=243574&view=diff</a><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> \
==============================================================================<br> >>>>> \
>> --- libcxx/trunk/www/index.html (original)<br> >>>>> >> +++ \
libcxx/trunk/www/index.html Wed Jul 29 16:07:28 2015<br> >>>>> >> @@ -184,26 +184,30 \
@@<br> >>>>> >><br>
>>>>> >> <p>In-tree build:</p><br>
>>>>> >> <ul><br>
>>>>> >> + <li><code>cd \
where-you-want-to-live</code></li><br> >>>>> >> <li>Check \
out libcxx and <a<br> </span>>>>>> >> href="<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__libcxxabi.llvm.org_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBP \
lktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=Nj9dmtIwRxroR5hibK_kr3HmV67FCTnUPHksySUpK74&e=" \
rel="noreferrer" target="_blank">http://libcxxabi.llvm.org/</a>">libcxxabi</a><br> <span \
class="">>>>>> >> into llvm/projects</li><br> >>>>> \
>> - <li><code>cd llvm</code></li><br> >>>>> >> + \
<li><code>cd where-you-want-to-build</code></li><br> >>>>> \
>> <li><code>mkdir build &amp;&amp; cd \
build</code></li><br> >>>>> >> - <li><code>cmake .. # \
Linux may require -DCMAKE_C_COMPILER=clang<br> >>>>> >> + \
<li><code>cmake path/to/llvm # Linux may require<br> >>>>> >> \
-DCMAKE_C_COMPILER=clang<br> >>>>> >> \
-DCMAKE_CXX_COMPILER=clang++</code></li><br> >>>>> >> \
<li><code>make cxx</code></li><br> >>>>> >> \
</ul><br> >>>>> >><br>
>>>>> >> - <p>Out-of-tree build:</p><br>
>>>>> >> + <p>Out-of-tree buildc:</p><br>
>>>>> >> <ul><br>
>>>>> >> - <li>Check out libcxx</li><br>
>>>>> >> + <li><code>cd \
where-you-want-to-live</code></li><br> >>>>> >> + <li>Check \
out libcxx and llvm</li><br> >>>>> >> <li>If not on a Mac, also \
check out<br> </span>>>>>> >> <a href="<a \
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__libcxxabi.llvm.org_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBP \
lktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=T9p5KsG5Q5KnnyCfiN85j_8KVxBYhvy38begk-WuMh8&s=Nj9dmtIwRxroR5hibK_kr3HmV67FCTnUPHksySUpK74&e=" \
rel="noreferrer" target="_blank">http://libcxxabi.llvm.org/</a>">libcxxabi</a></li><br>
<span class="">>>>>><br>
>>>>> >> - <li><code>cd libcxx</code></li><br>
>>>>> >> + <li><code>cd \
where-you-want-to-build</code></li><br> >>>>> >> \
<li><code>mkdir build &amp;&amp; cd build</code></li><br> \
>>>>> >> - <li><code>cmake -DLIBCXX_CXX_ABI=libcxxabi<br> \
>>>>> >> + <li><code>cmake -DLLVM_PATH=path/to/llvm<br> \
>>>>> >> + -DLIBCXX_CXX_ABI=libcxxabi<br> >>>>> >> \
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=path/to/libcxxabi/include<br> >>>>> >> - \
-DLIT_EXECUTABLE=path/to/llvm/utils/lit/lit.py .. # Linux<br> >>>>> >> may<br>
>>>>> >> require<br>
>>>>> >> - -DCMAKE_C_COMPILER=clang<br>
>>>>> >> -DCMAKE_CXX_COMPILER=clang++</code></li><br>
>>>>> >> + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++<br>
>>>>> >> + path/to/libcxx<br>
>>>>> >> + </code></li><br>
>>>>> >> <li><code>make</code></li><br>
>>>>> >> </ul><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> _______________________________________________<br>
>>>>> >> cfe-commits mailing list<br>
</span>>>>>> >> <a \
href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br> <span class="">>>>>> \
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" rel="noreferrer" \
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br> >>>>> \
><br> >>>>> ><br>
>>>>> ><br>
>>>>> > _______________________________________________<br>
>>>>> > cfe-commits mailing list<br>
</span>>>>>> > <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<span class="">>>>>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" \
rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br> \
>>>>> ><br> >>>><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Alexey Samsonov, Mountain View, CA<br>
>><br>
>><br>
>> _______________________________________________<br>
>> cfe-commits mailing list<br>
</span>>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<span class="">>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" rel="noreferrer" \
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br> >><br>
><br>
><br>
><br>
> --<br>
> Alexey Samsonov<br>
</span>> <a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a><br>
</blockquote></div><br></div>
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic