Commit Graph

51 Commits

Author SHA1 Message Date
Ed Schouten
abd06b4c9b Make the presence of stdin and stdout optional.
The idea behind Nuxi CloudABI is that it is targeted at (but not limited to)
running networked services in a sandboxed environment. The model behind stdin,
stdout and stderr is strongly focused on interactive tools in a command shell.
CloudABI does not support the notion of stdin and stdout, as 'standard
input/output' does not apply to services. The concept of stderr does makes
sense though, as services do need some mechanism to log error messages in a
uniform way.

This patch extends libc++ in such a way that std::cin and std::cout and the
associated <cstdio>/<cwchar> functions can be disabled through the flags
_LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time
it attempts to clean up src/iostream.cpp a bit. Instead of using a single array
of mbstate_t objects and hardcoding the array indices, it creates separate
objects that declared next to the iostream objects and their buffers. The code
is also restructured by interleaving the construction and setup of c* and wc*
objects. That way it is more obvious that this is done identically.

The c* and wc* objects already have separate unit tests. Make use of this fact
by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in
both directions. If stdin or stdout is disabled, these tests will therefore
test for the absence of c* and wc*.

Differential Revision:	http://reviews.llvm.org/D8340


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26 14:35:46 +00:00
Eric Fiselier
02c24c1d3b [libcxx] Unify LIBCXX_<ABI-Name>_INCLUDE_PATHS to be LIBCXX_CXX_ABI_INCLUDE_PATHS
Summary:
Clean up all the different possible CMake options for specifying the ABI include paths into one CMake option named `LIBCXX_CXX_ABI_INCLUDE_PATHS`. 
The documentation has been updated to reflect this change.

For the next week I have added explicit errors if any of the old flags is used. These errors inform users of the change and the new option to use.

Before committing the change I will announce this change on cfe-dev.

Reviewers: danalbert, mclow.lists

Reviewed By: danalbert, mclow.lists

Subscribers: jroelofs, cbergstrom, cfe-commits

Differential Revision: http://reviews.llvm.org/D5039

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232762 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-19 20:59:45 +00:00
Ed Schouten
b33ae5ba7d Add option to disable access to the global filesystem namespace.
Systems like FreeBSD's Capsicum and Nuxi CloudABI apply the concept of
capability-based security on the way processes can interact with the
filesystem API. It is no longer possible to interact with the VFS
through calls like open(), unlink(), rename(), etc. Instead, processes
are only allowed to interact with files and directories to which they
have been granted access. The *at() functions can be used for this
purpose.

This change adds a new config switch called
_LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE. If set, all functionality
that requires the global filesystem namespace will be disabled. More
concretely:

- fstream's open() function will be removed.
- cstdio will no longer pull in fopen(), rename(), etc.
- The test suite's get_temp_file_name() will be removed. This will cause
  all tests that use the global filesystem namespace to break, but will
  at least make all the other tests run (as get_temp_file_name will not
  build anyway).

It is important to mention that this change will make fstream rather
useless on those systems for now. Still, I'd rather not have fstream
disabled entirely, as it is of course possible to come up with an
extension for fstream that would allow access to local filesystem
namespaces (e.g., by adding an openat() member function).

Differential revision:	http://reviews.llvm.org/D8194
Reviewed by:		jroelofs (thanks!)


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232049 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-12 15:44:39 +00:00
Eric Fiselier
c0b166e944 [libcxx] Add support for linking libc++ against a static ABI library.
Summary:
This patch add the CMake option `LIBCXX_ENABLE_STATIC_ABI_LIBRARY` which, when enabled, will link libc++ against the static version of the ABI library.


Reviewers: mclow.lists, jroelofs, danalbert

Reviewed By: danalbert

Subscribers: compnerd, cfe-commits

Differential Revision: http://reviews.llvm.org/D8017

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231076 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 15:59:51 +00:00
Eric Fiselier
e9d4b23051 Adopt CMake policy CMP0042. Set MACOSX_RPATH on by default.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227139 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 21:56:45 +00:00
Dan Albert
cbc84977aa Remove triple detection from cmake.
This isn't actually used for anything, and is broken on Darwin
(currently causing build failures now that the triple is passed to aid
cross compiling). Rather than fix unused code, just remove it.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226243 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16 02:27:17 +00:00
Dan Albert
818911cc85 [libc++] Add support for cross compiling.
Reviewers: EricWF, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6990

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16 00:55:15 +00:00
Chandler Carruth
7a033ca056 [cmake/multilib] Teach libc++'s CMake build to support multilib libdir
suffixes like 'lib64' or 'lib32'.

This support is currently very rhudimentary. We define a variable
LIBCXX_LIBDIR_SUFFIX. In a standalone build of libc++ this can be
directly set as a cached variable to control the multilib suffix used.
When building libc++ within a larger LLVM build, it is hard wired to
whatever LLVM libdir suffix has been selected. If this doesn't work for
someone, just let me know. I'm happy to change it.

This is essentially new functionality for libc++ so I don't expect it to
have any impact for folks until they start setting these variables.
However, I know libc++ is built in a diverse set of environments so just
let me know if this causes you any problems.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224926 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-29 12:15:47 +00:00
Eric Fiselier
4778eed34f [libcxx] Teach libcxx's lit configuration new ways to find lit.site.cfg
Summary:
Currently to run tests in tree you need to symlink the lit.site.cfg file generated by the cmake build into the source tree, and teach your VCS to ignore it.

This allows the user to specify where to find the lit.site.cfg file two different ways:
* lit_site_config lit parameter
* LIT_SITE_CONFIG enviroment variable. 

example usage:
```
lit -sv --param=libcxx_site_config=path/to/libcxx-build/test/lit.site.cfg path/to/tests
```
Or
```
export LIBCXX_SITE_CONFIG=path/to/libcxx-build/test/lit.site.cfg
lit -sv path/to/tests
```
The command line parameter will override the environment variable. 
If neither options are present a warning is issued and the `lit.cfg` file is loaded directly. 


Reviewers: mclow.lists, jroelofs, danalbert

Reviewed By: danalbert

Subscribers: ddunbar, cfe-commits

Differential Revision: http://reviews.llvm.org/D6255

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224671 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20 03:16:55 +00:00
Eric Fiselier
9acbcee2c6 Add option to turn off installation of headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224162 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-12 22:52:58 +00:00
Eric Fiselier
ae9fec0bdf Add support for building libc++ as a 32 bit library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224096 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-12 03:12:18 +00:00
Eric Fiselier
7330ed3228 Add support for building and testing libc++ without threads to CMake.
Currently hacks must be used in to configure and build libc++ without threads
when using CMake. This patch adds CMake options to enable/disable building with
threads and a monotonic clock.

This patch also propagates the configuration information to lit so the tests
are properly configured as well.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@223591 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 21:02:58 +00:00
Eric Fiselier
af2976deb3 Add support for LLVM_USE_SANITIZER=Thread
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222259 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-18 21:26:45 +00:00
Eric Fiselier
9a1468f79e Fix build regression caused by not defining ABI library macros
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222085 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-15 17:25:23 +00:00
Eric Fiselier
8e2855ce0b [libcxx] Refactor CMakeLists.txt handling of compile and link flags to suppress warnings.
Summary:
Currently we have 5 variables that are used to specify options for building libcxx
1. `LIBCXX_CXX_FEATURE_FLAGS`
2. `LIBCXX_CXX_WARNING_FLAGS`
3. `LIBCXX_CXX_REQUIRED_FLAGS`
4. `compile_flags` (in libcxx/lib)
5. `link_flags` (in libcxx/lib)

The first three all get put into `CMAKE_CXX_FLAGS`. 
This changes the way flags are handled by only using 3 different options:

1. `LIBCXX_CXX_FLAGS` - general compile and link flags.
2. `LIBCXX_COMPILE_FLAGS` - compile only flags.
3. `LIBCXX_LINK_FLAGS` - link only flags.

This patch also removes the warning about `-nostdinc++` being unused during linking.



Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6277

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222080 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-15 06:26:30 +00:00
Eric Fiselier
fd2848735a Add -gline-tables-only when compiling w/ sanitizers in RELEASE
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222035 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-14 20:38:07 +00:00
Eric Fiselier
9071bc098b [libcxx] Add support for building and testing with an ABI library not along linker paths
Summary:
This patch adds support for building/testing libc++ with an ABI library that the linker would not normally find.

- `CMAKE_LIBRARY_PATH` is used to specify the list of search directories.
- The ABI library is now found using `find_library` instead of assuming its along the linker's search path.
- `CMAKE_LIBRARY_PATH` is passed to our LIT config as `library_paths`.
- For each path in `library_paths` the following flags are added `-L<path> -Wl,-rpath -Wl,<path>`

Some changes in existing behavior were also added:
- `target_link_libraries` is now passed the ABI library file instead of the library name. Ex `target_link_libraries(cxx "/usr/lib/libc++abi.so")` vs `target_link_libraries(cxx "c++abi")`.
- `-Wl,-rpath -Wl,<path>` is now used on OSX to link to libc++ instead of env['DYLD_LIBRARY_PATH'] if `use_system_lib=False`.




Reviewers: mclow.lists, danalbert, EricWF

Reviewed By: EricWF

Subscribers: emaste, cfe-commits

Differential Revision: http://reviews.llvm.org/D5038

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220118 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-18 01:15:17 +00:00
Eric Fiselier
66d529f0ad [libcxx] Add support for LLVM_USE_SANITIZER=Undefined
LLVM_USE_SANITIZER=Undefined support was added to the LLVM CMake configuration.
Update libc++'s handling of LLVM_USE_SANITIZER to support this as well.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@219987 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-16 23:21:59 +00:00
Eric Fiselier
300da4f9b0 [libcxx] Fix installation of ABI headers. Fixes PR20936
Summary:
I changed the build so that each ABI header gets its own install rule. This gives us the flexibility to install different headers in different directories. 
This also fixes the problem where libstdc++ bits/<header>'s were not being installed under a bits directory.

Test Plan: I tested this patch on linux against libstdc++ and libcxxabi.

Reviewers: danalbert, mclow.lists, jroelofs

Reviewed By: jroelofs

Subscribers: jhunold, cfe-commits

Differential Revision: http://reviews.llvm.org/D5454

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@218309 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-23 14:42:28 +00:00
Eric Fiselier
25a1516832 [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree
Summary:
This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. 

This patch does the following things:
1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it.
2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake.
3. Add config.llvm_use_sanitizer to lit.site.cfg.in
4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg.

Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. 

Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4949

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215872 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 05:03:46 +00:00
Eric Fiselier
dfe5e72ed3 [libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormat
Summary:
This patch does two things:
CMake Update:
  - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x.
  - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default.
  - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y
  - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11.

Lit Update:
  - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std.
  - Remove mentions of has_cxx0X configuration option.
  - Check for `--param std=X' passed to lit on the command line.
  - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg.



Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits

Differential Revision: http://reviews.llvm.org/D4329

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215802 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-16 01:35:36 +00:00
Viktor Kutuzov
f2e8c04540 Fix re-building in-tree libc++ against in-tree libc++abi
Differential Revision: http://reviews.llvm.org/D4805


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215186 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-08 06:53:30 +00:00
Alexey Samsonov
e515bbda1b Fix linking with just-built libc++abi (added in r214037).
Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure
that linker is able to locate just-built libc++abi in the build tree,
instead of relying on "-lc++abi" linker flag.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214114 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-28 19:25:44 +00:00
Dan Albert
0c6d1a88de Better defaults for in-tree libc++ with cmake.
This will detect if you are building libcxx in-tree and libcxxabi is
available.  If so, it will default to using the in-tree libcxxabi by
setting LIBCXX_CXX_ABI to "libcxxabi", LIBCXX_LIBCXXABI_INCLUDE_PATHS to
"${CMAKE_SOURCE_DIR}/projects/libcxxabi/include" and will add "cxxabi"
as a proper dependency.

Patch by Russell Harmon.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214037 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-26 23:08:33 +00:00
David Fang
44ead61237 eliminate install of duplicate headers (take 2)
Patch by Ryuta Suzuki

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@211629 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-24 20:32:11 +00:00
David Fang
04035d66d0 Revert "fixes duplicate header installation"
This reverts commit 0bd40d6c3d.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210857 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-12 23:19:55 +00:00
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