Commit Graph

25 Commits

Author SHA1 Message Date
David Fang
0bd40d6c3d fixes duplicate header installation
http://llvm.org/bugs/show_bug.cgi?id=18681
Patch by Ryuta Suzuki <oroppas gmail com>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210577 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-10 20:26:54 +00:00
Saleem Abdulrasool
eb547816ea build: fix erroneous overwriting of flags
Always use list(APPEND) as it will perform the desired action even if the list
is empty or previously unset.  The first set is harmless, however, the
subsequent set was overwriting the previous flag setup resulting in an improper
compilation command being generated.  This manifested as a build failure on
Linux when using cmake + ninja.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203638 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 04:11:31 +00:00
Saleem Abdulrasool
89a52ffd54 build: fix add_definition abuse in CMake
add_definitions is meant for adding C preprocessor definitions.  Modern cmake
suggests use of the CMAKE_CXX_FLAGS for the purposes of pushing flags to the
compilation commands.  Simply switch to the modern form given that we are
already requiring a new enough cmake.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203637 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 04:11:28 +00:00
Saleem Abdulrasool
6875f3b6e4 build: remove an errant comma
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203636 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 04:11:25 +00:00
Howard Hinnant
c4962b3f44 Justin Bogner: This makes the headers available in the build directory, making it
easier to use freshly-built clang with freshly-built libc++.

Basically, this makes it possible to run clang with libc++ without
having to install it, even if you don't have any version of libc++
installed in /usr/

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15 17:18:57 +00:00
Marshall Clow
0f7afe7b8e Patch by GM: Turn off 'deprecated' warnings when building with MSVC, and add '-Werror=return-type' to catch funtions that aren't returning what they should.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21 15:56:35 +00:00
Peter Collingbourne
d0d308f54b Make it possible to link against libstdc++ as well as libsupc++ with CMake.
Linking against libstdc++, rather than libsupc++, is probably better
for people who need to link against clients of libstdc++.  Because
libsupc++ is provided only as a static library, its globals are not
shared between the static library and the copy linked into libstdc++.
This has been found to cause at least one test failure.

This also removes a number of symbols which were multiply defined
between libstdc++ and libc++, only when linking with libstdc++.

Differential Revision: http://llvm-reviews.chandlerc.com/D1825

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 22:13:19 +00:00
Howard Hinnant
adb73b1701 G M: Attached is a patch for libcxx's cmake file.
I've changed it so we don't set highest level warnings (all) for MSVC when building projects using cmake and instead leave the default. That's /W4 on my machine and seems to be ok.
 
With all warnings on for msvc, we see literally thousands of warnings. 99.99% aren't relevant and just obscure the ones that are.
I think the user can still override things if they want something different from the command line when using cmake.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@192010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 00:07:35 +00:00
Peter Collingbourne
66a8fcecd9 libc++abi no longer has a cxa_demangle.h header.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191935 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 22:58:36 +00:00
Peter Collingbourne
4c81b00f75 Make it possible to run the test suite when built as part of LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191930 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 21:58:25 +00:00
Alexey Samsonov
f7eb5738f6 Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false.
libcxx doesn't build with -Werror because of #warnings in its source
code. But when libcxx is built as an external LLVM project, it inherits
LLVM build flags, breaking the build if LLVM_ENABLE_WERROR is enabled.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 07:44:19 +00:00
Alexey Samsonov
179fa78da3 [CMake] Put libcxx-specific module directories to the front of CMAKE_MODULE_PATH.
Otherwise if libcxx is built as an LLVM external project (after r191624),
"include(config-ix)" will include config-ix.cmake from LLVM, not from libcxx,
which will result in misconfigured build tree.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191657 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 09:10:01 +00:00
Michael Gottesman
c64c980140 [cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189739 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 07:28:05 +00:00
Howard Hinnant
9c07b14797 G M: minor fix to silence warning in cmake version 2.8.11.20130809-gba97e.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188712 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-19 21:42:07 +00:00
Howard Hinnant
b777d6a4b2 The cmake script is failing to copy cxxabi.h to the right place because it was generating to destination path like so /include// and dstdir can legally be blank from my interpretation of the script, and this would then generate a path like libcxx/include// which is illegal.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178579 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 21:33:01 +00:00
Howard Hinnant
4a0e74fff8 Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-25 15:50:36 +00:00
Howard Hinnant
b85dea35b0 Michael van der Westhuizen: update to CMake.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174731 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 19:04:53 +00:00
Howard Hinnant
46c49d19aa Michael van der Westhuizen: The attached patch add support for building against libc++abi and libcxxrt to CMake builds of libc++.
Usage (with the appropriate CC and CXX environment variables) is:
$ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx
and:
$ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:27:39 +00:00
Howard Hinnant
7173a501bb Saleem Abdulrasool: Ensure that __GLIBCXX__ is defined when building with libsupc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 14:44:06 +00:00
Howard Hinnant
750039f50c Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:07:27 +00:00
Michael J. Spencer
db8a030bd3 [CMake] Fix c++ abi library configuration on Linux.
You can now configure from the command line using:
-DLIBCXX_CXX_ABI=libsupc++
-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="path;path

Also documents how to build on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171316 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 19:34:21 +00:00
Michael J. Spencer
a358fbe504 [CMake] Add support for selecting which c++ abi library to use.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@169036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-30 21:02:29 +00:00
Howard Hinnant
e103a3d69b Andrew Morrow: The current CMake setup for libc++ incorrectly uses the variable
LLVM_ENABLE_ASSERTIONS instead of LIBCXX_ENABLE_ASSERTIONS when
figuring out what _DEBUG/NDEBUG defines to set. It also tries to test
the non-existent variable 'uppercase_CMAKE_BUILD_TYPE', which the top
level LLVM CMakeLists.txt sets up, but which the top level libc++
CMakeLists.txt currently does not. Changing the variable name tested
and creating the uppercase release name variable allows libc++ to
honor the LIBCXX_ENABLE_ASSERTIONS option correctly.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161308 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05 17:37:39 +00:00
Douglas Gregor
f9b6e7eeef Fix warning flags for CMake builds, from Andrew C. Morrow!
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@158172 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-07 22:26:00 +00:00
Michael J. Spencer
626916fc25 Add CMake build and fix major Linux blockers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@121510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:47:54 +00:00