Commit Graph

21 Commits

Author SHA1 Message Date
Petr Hosek 510e70fdd5 [libcxx][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.

Differential Revision: https://reviews.llvm.org/D33762

llvm-svn: 307615
2017-07-11 02:39:50 +00:00
Eric Fiselier a0a61faad1 Simplify CMake target for the __generated_config header
llvm-svn: 290875
2017-01-03 11:18:17 +00:00
Saleem Abdulrasool 833094463c build: remove now unused UNIX_CAT
THe previous change replaced the use of `cat` or `type` with a custom
python script.  Remove the now unused command determining.

llvm-svn: 290856
2017-01-03 04:23:50 +00:00
Eric Fiselier 887894aaef Fix creating __generated_config on Windows
llvm-svn: 290853
2017-01-03 03:55:29 +00:00
Saleem Abdulrasool 61bce47e3b build: differentiate between building for and on Windows
This is necessary to support cross-compiling a Windows libc++ from
Linux.  The CMAKE_SYSTEM_HOST_NAME tells you what, in autotools
parlance, is known as the build as opposed to WIN32 which maps to, in
autotools parlance, host.

llvm-svn: 290800
2017-01-01 20:20:36 +00:00
Chris Bieneman ca7d19e595 [CMake] Fix issue reported on sanitizer bots
This should resolve an issue reported on the commit thread that impacted sanitizer bots.

llvm-svn: 290052
2016-12-17 21:28:24 +00:00
Chris Bieneman 6c29367330 [CMake] Put headers relative to clang
When libcxx isn't building with an installed LLVM we copy the libcxx headers into the LLVM build directory so that a clang in that build tree can find the headers relative to itself.

This is only important in situations where you don't have headers installed under /, which is common these days on Darwin.

llvm-svn: 289963
2016-12-16 17:30:51 +00:00
Eric Fiselier 28349f9bf2 Add check-cxx-abilist target when supported.
This patch adds a `check-cxx-abilist` target which verifies the libc++.so ABI
when the current build configuration matches the configuration used to generate
the ABI lists.

In order to make this change `HandleOutOfTreeLLVM.cmake` needed to be modified
to include `LLVMConfig.cmake` so that `TARGET_TRIPLE` is defined. Hopefully
the changes needed to accommodate this won't break existing build
configurations.

llvm-svn: 286789
2016-11-14 02:43:12 +00:00
Chris Bieneman 1c4b97083d [CMake] NFC. Fixing spelling from r280400
Doh!

llvm-svn: 280406
2016-09-01 19:46:02 +00:00
Chris Bieneman bd715f84a4 [CMake] Don't copy headers on fully standalone
In r280108 I tried to make the headers copy relative to LLVM_BINARY_DIR, and the intent was that it would only happen on in-tree builds or runtimes directory builds. It didn't actually work that way.

This patch adds a check for CMAKE_SOURCE_DIR being equal to CMAKE_CURRENT_SOURCE_DIR. In this case we set a variable LIBCXX_USING_INSTLLED_LLVM. This doesn't necessarily mean the LLVM is installed (it could be a build directory), but it means we need to treat the LLVM directory as read-only.

llvm-svn: 280400
2016-09-01 18:46:53 +00:00
Chris Bieneman 0e4c73b24d [CMake] Copy headers relative to LLVM_BINARY_DIR
Summary: This copy phase is only needed for in-tree builds, so we should be copying to the LLVM build directory's include dir instead of the sub-project include dir.

Reviewers: bogner, EricWF

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D24015

llvm-svn: 280108
2016-08-30 16:51:34 +00:00
Chris Bieneman f17227a1da [CMake] Be more consistent about naming targets and components
Summary:
The point of this patch is to have a consistent convention for naming build, check and install targets so that the targets can be constructed from the project name.

This change renames a bunch of CMake components and targets from libcxx to cxx. For each renamed target I've added a convenience target that matches the old target name and depends on the new target. This will preserve function of the old targets so that the change doesn't break the world. We can evaluate if it is worth removing the extra targets later.

Reviewers: EricWF

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D23699

llvm-svn: 279675
2016-08-24 22:17:06 +00:00
Eric Fiselier 139dc2d728 Fix PR27751. Add proper dependancies for install-libcxx-headers rule
llvm-svn: 271073
2016-05-27 23:33:10 +00:00
Chris Bieneman b05112452f [CMake] Fix a copy-paste error
Based on post commit feedback from Eric Fiselier.

llvm-svn: 268401
2016-05-03 16:54:20 +00:00
Chris Bieneman 4497e3a1e6 [CMake] Create a separate install target for libcxx headers
This change doesn't impact the behavior of the install-libcxx target which installs whichever libcxx components you build, it just adds a separate target to just install the headers.

llvm-svn: 268124
2016-04-29 22:17:15 +00:00
Eric Fiselier f9f796e79b [libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,

This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.

Please read the design documentation added in this patch for a description of how it works.

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits

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

llvm-svn: 250235
2015-10-13 22:12:02 +00:00
Eric Fiselier 7cb813ffc4 [libcxx] Add "install-libcxx" target.
Summary: Currently you can't install libc++ from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++.

Reviewers: mclow.lists, danalbert, jroelofs, EricWF

Subscribers: cfe-commits

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

llvm-svn: 245470
2015-08-19 17:41:53 +00:00
Eric Fiselier bfd53cd2af Add option to turn off installation of headers.
llvm-svn: 224162
2014-12-12 22:52:58 +00:00
Justin Bogner acb64e8875 Make headers available in the build directory
This essentially re-does r194825 and 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/.

This behaviour broke in r210577/r211629, which fixed pr18681.

llvm-svn: 220489
2014-10-23 16:51:12 +00:00
David Fang ed7987dcfe eliminate install of duplicate headers (take 2)
Patch by Ryuta Suzuki

llvm-svn: 211629
2014-06-24 20:32:11 +00:00
Justin Bogner fd6cfe92d3 Add the CMakeLists.txt that was missed in r194825
llvm-svn: 194838
2013-11-15 18:34:43 +00:00