blob: e6a21a930f014a8e991eb6a7614dc3d1fafa9b33 [file] [log] [blame]
Eric Fiseliera0733922016-06-02 02:16:28 +00001.. _BuildingLibcxx:
Eric Fiselierd720d1f2015-08-22 19:40:49 +00002
3===============
4Building libc++
5===============
6
7.. contents::
8 :local:
9
Eric Fiselierfa43a5c2016-05-03 22:32:08 +000010.. _build instructions:
11
Eric Fiselierd720d1f2015-08-22 19:40:49 +000012Getting Started
13===============
14
15On Mac OS 10.7 (Lion) and later, the easiest way to get this library is to install
16Xcode 4.2 or later. However if you want to install tip-of-trunk from here
17(getting the bleeding edge), read on.
18
19The basic steps needed to build libc++ are:
20
James Y Knightf18eebf2019-01-29 16:37:27 +000021#. Checkout and configure LLVM (including libc++ and libc++abi), according to the `LLVM
22 getting started <https://llvm.org/docs/GettingStarted.html>`_ documentation. Make sure
23 to include ``libcxx`` and ``libcxxabi`` in the ``LLVM_ENABLE_PROJECTS`` option passed
24 to CMake.
Eric Fiselierd720d1f2015-08-22 19:40:49 +000025
26 For more information about configuring libc++ see :ref:`CMake Options`.
27
28 * ``make cxx`` --- will build libc++ and libc++abi.
Eric Fiselierbd402832016-08-28 18:33:08 +000029 * ``make check-cxx check-cxxabi`` --- will run the test suites.
Eric Fiselierd720d1f2015-08-22 19:40:49 +000030
31 Shared libraries for libc++ and libc++ abi should now be present in llvm/build/lib.
32 See :ref:`using an alternate libc++ installation <alternate libcxx>`
33
34#. **Optional**: Install libc++ and libc++abi
35
36 If your system already provides a libc++ installation it is important to be
37 careful not to replace it. Remember Use the CMake option ``CMAKE_INSTALL_PREFIX`` to
38 select a safe place to install libc++.
39
Eric Fiselierbd402832016-08-28 18:33:08 +000040 * ``make install-cxx install-cxxabi`` --- Will install the libraries and the headers
Eric Fiselierd720d1f2015-08-22 19:40:49 +000041
42 .. warning::
43 * Replacing your systems libc++ installation could render the system non-functional.
J. Ryan Stinnettc858d6a2019-05-30 16:46:22 +000044 * macOS will not boot without a valid copy of ``libc++.1.dylib`` in ``/usr/lib``.
Eric Fiselierd720d1f2015-08-22 19:40:49 +000045
46
47The instructions are for building libc++ on
48FreeBSD, Linux, or Mac using `libc++abi`_ as the C++ ABI library.
49On Linux, it is also possible to use :ref:`libsupc++ <libsupcxx>` or libcxxrt.
50
James Y Knightf18eebf2019-01-29 16:37:27 +000051It is sometimes beneficial to build separately from the full LLVM build. An
52out-of-tree build would look like this:
Eric Fiselierd720d1f2015-08-22 19:40:49 +000053
54.. code-block:: bash
55
56 $ cd where-you-want-libcxx-to-live
James Y Knightf18eebf2019-01-29 16:37:27 +000057 $ # Check out the sources (includes everything, but we'll only use libcxx)
58 $ ``git clone https://github.com/llvm/llvm-project.git``
Eric Fiselierd720d1f2015-08-22 19:40:49 +000059 $ cd where-you-want-to-build
60 $ mkdir build && cd build
61 $ export CC=clang CXX=clang++
James Y Knightf18eebf2019-01-29 16:37:27 +000062 $ cmake -DLLVM_PATH=path/to/separate/llvm \
Eric Fiselierd720d1f2015-08-22 19:40:49 +000063 -DLIBCXX_CXX_ABI=libcxxabi \
James Y Knightf18eebf2019-01-29 16:37:27 +000064 -DLIBCXX_CXX_ABI_INCLUDE_PATHS=path/to/separate/libcxxabi/include \
65 path/to/llvm-project/libcxx
Eric Fiselierd720d1f2015-08-22 19:40:49 +000066 $ make
67 $ make check-libcxx # optional
68
69
Saleem Abdulrasool3ab0b702017-02-10 03:58:20 +000070Experimental Support for Windows
71--------------------------------
72
73The Windows support requires building with clang-cl as cl does not support one
74required extension: `#include_next`. Furthermore, VS 2015 or newer (19.00) is
75required. In the case of clang-cl, we need to specify the "MS Compatibility
76Version" as it defaults to 2014 (18.00).
77
78CMake + Visual Studio
79~~~~~~~~~~~~~~~~~~~~~
80
81Building with Visual Studio currently does not permit running tests. However,
82it is the simplest way to build.
83
84.. code-block:: batch
85
86 > cmake -G "Visual Studio 14 2015" ^
87 -T "LLVM-vs2014" ^
88 -DLIBCXX_ENABLE_SHARED=YES ^
89 -DLIBCXX_ENABLE_STATIC=NO ^
90 -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO ^
91 \path\to\libcxx
92 > cmake --build .
93
94CMake + ninja
95~~~~~~~~~~~~~
96
97Building with ninja is required for development to enable tests.
98Unfortunately, doing so requires additional configuration as we cannot
99just specify a toolset.
100
101.. code-block:: batch
102
103 > cmake -G Ninja ^
104 -DCMAKE_MAKE_PROGRAM=/path/to/ninja ^
105 -DCMAKE_SYSTEM_NAME=Windows ^
106 -DCMAKE_C_COMPILER=clang-cl ^
107 -DCMAKE_C_FLAGS="-fms-compatibility-version=19.00 --target=i686--windows" ^
Hamza Sood4e2e4712017-12-03 10:18:35 +0000108 -DCMAKE_CXX_COMPILER=clang-cl ^
Saleem Abdulrasool3ab0b702017-02-10 03:58:20 +0000109 -DCMAKE_CXX_FLAGS="-fms-compatibility-version=19.00 --target=i686--windows" ^
110 -DLLVM_PATH=/path/to/llvm/tree ^
111 -DLIBCXX_ENABLE_SHARED=YES ^
112 -DLIBCXX_ENABLE_STATIC=NO ^
113 -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO ^
114 \path\to\libcxx
115 > /path/to/ninja cxx
116 > /path/to/ninja check-cxx
117
118Note that the paths specified with backward slashes must use the `\\` as the
119directory separator as clang-cl may otherwise parse the path as an argument.
120
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000121.. _`libc++abi`: http://libcxxabi.llvm.org/
122
123
124.. _CMake Options:
125
126CMake Options
127=============
128
129Here are some of the CMake variables that are used often, along with a
130brief explanation and LLVM-specific notes. For full documentation, check the
131CMake docs or execute ``cmake --help-variable VARIABLE_NAME``.
132
133**CMAKE_BUILD_TYPE**:STRING
134 Sets the build type for ``make`` based generators. Possible values are
135 Release, Debug, RelWithDebInfo and MinSizeRel. On systems like Visual Studio
136 the user sets the build type with the IDE settings.
137
138**CMAKE_INSTALL_PREFIX**:PATH
139 Path where LLVM will be installed if "make install" is invoked or the
140 "INSTALL" target is built.
141
142**CMAKE_CXX_COMPILER**:STRING
143 The C++ compiler to use when building and testing libc++.
144
145
146.. _libcxx-specific options:
147
148libc++ specific options
149-----------------------
150
Eric Fiselierfa43a5c2016-05-03 22:32:08 +0000151.. option:: LIBCXX_INSTALL_LIBRARY:BOOL
152
153 **Default**: ``ON``
154
155 Toggle the installation of the library portion of libc++.
156
157.. option:: LIBCXX_INSTALL_HEADERS:BOOL
158
159 **Default**: ``ON``
160
161 Toggle the installation of the libc++ headers.
162
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000163.. option:: LIBCXX_ENABLE_ASSERTIONS:BOOL
164
165 **Default**: ``ON``
166
167 Build libc++ with assertions enabled.
168
169.. option:: LIBCXX_BUILD_32_BITS:BOOL
170
171 **Default**: ``OFF``
172
Eric Fiselier887b86b2016-09-16 03:47:53 +0000173 Build libc++ as a 32 bit library. Also see `LLVM_BUILD_32_BITS`.
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000174
175.. option:: LIBCXX_ENABLE_SHARED:BOOL
176
177 **Default**: ``ON``
178
Eric Fiselier887b86b2016-09-16 03:47:53 +0000179 Build libc++ as a shared library. Either `LIBCXX_ENABLE_SHARED` or
180 `LIBCXX_ENABLE_STATIC` has to be enabled.
Petr Hosek13620052016-08-08 22:57:25 +0000181
182.. option:: LIBCXX_ENABLE_STATIC:BOOL
183
184 **Default**: ``ON``
185
Eric Fiselier887b86b2016-09-16 03:47:53 +0000186 Build libc++ as a static library. Either `LIBCXX_ENABLE_SHARED` or
187 `LIBCXX_ENABLE_STATIC` has to be enabled.
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000188
189.. option:: LIBCXX_LIBDIR_SUFFIX:STRING
190
191 Extra suffix to append to the directory where libraries are to be installed.
Eric Fiselier887b86b2016-09-16 03:47:53 +0000192 This option overrides `LLVM_LIBDIR_SUFFIX`.
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000193
Petr Hosek3975d8d2017-07-11 02:39:50 +0000194.. option:: LIBCXX_INSTALL_PREFIX:STRING
195
196 **Default**: ``""``
197
198 Define libc++ destination prefix.
Eric Fiselierfa43a5c2016-05-03 22:32:08 +0000199
Petr Hosekb42e3492019-01-06 06:14:31 +0000200.. option:: LIBCXX_HERMETIC_STATIC_LIBRARY:BOOL
201
202 **Default**: ``OFF``
203
Jonathan Metzmance2328d2019-04-10 23:44:27 +0000204 Do not export any symbols from the static libc++ library.
Petr Hosekb42e3492019-01-06 06:14:31 +0000205 This is useful when the static libc++ library is being linked into shared
206 libraries that may be used in with other shared libraries that use different
Louis Dionned0889672019-08-23 19:42:09 +0000207 C++ library. We want to avoid exporting any libc++ symbols in that case.
Petr Hosekb42e3492019-01-06 06:14:31 +0000208
Eric Fiselier72e2dd82019-03-21 00:04:31 +0000209.. option:: LIBCXX_ENABLE_FILESYSTEM:BOOL
210
211 **Default**: ``ON`` except on Windows.
212
213 This option can be used to enable or disable the filesystem components on
214 platforms that may not support them. For example on Windows.
215
Eric Fiselierfa43a5c2016-05-03 22:32:08 +0000216.. _libc++experimental options:
217
218libc++experimental Specific Options
219------------------------------------
220
221.. option:: LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL
222
223 **Default**: ``ON``
224
225 Build and test libc++experimental.a.
226
227.. option:: LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY:BOOL
228
Eric Fiselier121594e2016-09-07 01:15:10 +0000229 **Default**: ``LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY AND LIBCXX_INSTALL_LIBRARY``
Eric Fiselierfa43a5c2016-05-03 22:32:08 +0000230
231 Install libc++experimental.a alongside libc++.
232
233
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000234.. _ABI Library Specific Options:
235
236ABI Library Specific Options
237----------------------------
238
239.. option:: LIBCXX_CXX_ABI:STRING
240
241 **Values**: ``none``, ``libcxxabi``, ``libcxxrt``, ``libstdc++``, ``libsupc++``.
242
243 Select the ABI library to build libc++ against.
244
245.. option:: LIBCXX_CXX_ABI_INCLUDE_PATHS:PATHS
246
247 Provide additional search paths for the ABI library headers.
248
249.. option:: LIBCXX_CXX_ABI_LIBRARY_PATH:PATH
250
251 Provide the path to the ABI library that libc++ should link against.
252
253.. option:: LIBCXX_ENABLE_STATIC_ABI_LIBRARY:BOOL
254
255 **Default**: ``OFF``
256
257 If this option is enabled, libc++ will try and link the selected ABI library
258 statically.
259
Eric Fiselier0b09dd12015-10-15 22:41:51 +0000260.. option:: LIBCXX_ENABLE_ABI_LINKER_SCRIPT:BOOL
261
262 **Default**: ``ON`` by default on UNIX platforms other than Apple unless
263 'LIBCXX_ENABLE_STATIC_ABI_LIBRARY' is ON. Otherwise the default value is ``OFF``.
264
265 This option generate and installs a linker script as ``libc++.so`` which
266 links the correct ABI library.
267
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000268.. option:: LIBCXXABI_USE_LLVM_UNWINDER:BOOL
269
270 **Default**: ``OFF``
271
272 Build and use the LLVM unwinder. Note: This option can only be used when
273 libc++abi is the C++ ABI library used.
274
275
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000276libc++ Feature Options
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000277----------------------
278
279.. option:: LIBCXX_ENABLE_EXCEPTIONS:BOOL
280
281 **Default**: ``ON``
282
283 Build libc++ with exception support.
284
285.. option:: LIBCXX_ENABLE_RTTI:BOOL
286
287 **Default**: ``ON``
288
289 Build libc++ with run time type information.
290
Saleem Abdulrasool1e06a1d2019-07-04 19:08:16 +0000291.. option:: LIBCXX_INCLUDE_TESTS:BOOL
292
293 **Default**: ``ON`` (or value of ``LLVM_INCLUDE_DIR``)
294
295 Build the libc++ tests.
296
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000297.. option:: LIBCXX_INCLUDE_BENCHMARKS:BOOL
Evgeniy Stepanovda2ff7e2015-10-13 23:48:28 +0000298
Eric Fiselier93f212c2016-08-29 19:50:49 +0000299 **Default**: ``ON``
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000300
301 Build the libc++ benchmark tests and the Google Benchmark library needed
302 to support them.
303
Eric Fiselier453bc182018-11-14 20:38:46 +0000304.. option:: LIBCXX_BENCHMARK_TEST_ARGS:STRING
305
306 **Default**: ``--benchmark_min_time=0.01``
307
308 A semicolon list of arguments to pass when running the libc++ benchmarks using the
309 ``check-cxx-benchmarks`` rule. By default we run the benchmarks for a very short amount of time,
310 since the primary use of ``check-cxx-benchmarks`` is to get test and sanitizer coverage, not to
311 get accurate measurements.
312
Eric Fiselier18d2fa32016-10-30 22:53:00 +0000313.. option:: LIBCXX_BENCHMARK_NATIVE_STDLIB:STRING
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000314
Eric Fiselier18d2fa32016-10-30 22:53:00 +0000315 **Default**:: ``""``
316
317 **Values**:: ``libc++``, ``libstdc++``
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000318
319 Build the libc++ benchmark tests and Google Benchmark library against the
Louis Dionneecc89552019-10-01 20:34:50 +0000320 specified standard library on the platform. On Linux this can be used to
Eric Fiselier18d2fa32016-10-30 22:53:00 +0000321 compare libc++ to libstdc++ by building the benchmark tests against both
322 standard libraries.
323
324.. option:: LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN:STRING
325
326 Use the specified GCC toolchain and standard library when building the native
327 stdlib benchmark tests.
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000328
Louis Dionne1821de42018-08-16 12:44:28 +0000329.. option:: LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT:BOOL
330
331 **Default**: ``OFF``
332
333 Pick the default for whether to constrain ABI-unstable symbols to
334 each individual translation unit. This setting controls whether
335 `_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT` is defined by default --
336 see the documentation of that macro for details.
337
Eric Fiselier9e3e1372016-07-19 23:07:03 +0000338
339libc++ ABI Feature Options
340--------------------------
Evgeniy Stepanovda2ff7e2015-10-13 23:48:28 +0000341
342The following options allow building libc++ for a different ABI version.
343
344.. option:: LIBCXX_ABI_VERSION:STRING
345
346 **Default**: ``1``
347
348 Defines the target ABI version of libc++.
349
350.. option:: LIBCXX_ABI_UNSTABLE:BOOL
351
352 **Default**: ``OFF``
353
354 Build the "unstable" ABI version of libc++. Includes all ABI changing features
355 on top of the current stable version.
356
Eric Fiselierb33778a2018-10-30 21:44:53 +0000357.. option:: LIBCXX_ABI_NAMESPACE:STRING
358
359 **Default**: ``__n`` where ``n`` is the current ABI version.
360
361 This option defines the name of the inline ABI versioning namespace. It can be used for building
362 custom versions of libc++ with unique symbol names in order to prevent conflicts or ODR issues
363 with other libc++ versions.
364
365 .. warning::
366 When providing a custom namespace, it's the users responsibility to ensure the name won't cause
Louis Dionne6f2c6fb2018-11-16 14:57:47 +0000367 conflicts with other names defined by libc++, both now and in the future. In particular, inline
368 namespaces of the form ``__[0-9]+`` are strictly reserved by libc++ and may not be used by users.
369 Doing otherwise could cause conflicts and hinder libc++ ABI evolution.
Eric Fiselierb33778a2018-10-30 21:44:53 +0000370
Shoaib Meenai4ca4b7c2017-10-04 23:17:12 +0000371.. option:: LIBCXX_ABI_DEFINES:STRING
372
373 **Default**: ``""``
374
375 A semicolon-separated list of ABI macros to persist in the site config header.
376 See ``include/__config`` for the list of ABI macros.
377
Eric Fiselierf3566292019-05-29 02:21:37 +0000378
379.. option:: LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
380
381 **Default**: ``None``. When defined this option overrides the libraries default configuration
382 for whether merged type info names are present.
383
384
385 Build ``std::type_info`` with the assumption that type info names for a type have been fully
386 merged are unique across the entire program. This may not be the case for libraries built with
387 ``-Bsymbolic`` or due to compiler or linker bugs (Ex. llvm.org/PR37398).
388
389 When the value is ``ON`` typeinfo comparisons compare only the pointer value, otherwise ``strcmp``
390 is used as a fallback.
391
392
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000393.. _LLVM-specific variables:
394
395LLVM-specific options
396---------------------
397
398.. option:: LLVM_LIBDIR_SUFFIX:STRING
399
400 Extra suffix to append to the directory where libraries are to be
401 installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
402 to install libraries to ``/usr/lib64``.
403
404.. option:: LLVM_BUILD_32_BITS:BOOL
405
406 Build 32-bits executables and libraries on 64-bits systems. This option is
Louis Dionneecc89552019-10-01 20:34:50 +0000407 available only on some 64-bits Unix systems. Defaults to OFF.
Eric Fiselierd720d1f2015-08-22 19:40:49 +0000408
409.. option:: LLVM_LIT_ARGS:STRING
410
411 Arguments given to lit. ``make check`` and ``make clang-test`` are affected.
412 By default, ``'-sv --no-progress-bar'`` on Visual C++ and Xcode, ``'-sv'`` on
413 others.
414
415
416Using Alternate ABI libraries
417=============================
418
419
420.. _libsupcxx:
421
422Using libsupc++ on Linux
423------------------------
424
425You will need libstdc++ in order to provide libsupc++.
426
427Figure out where the libsupc++ headers are on your system. On Ubuntu this
428is ``/usr/include/c++/<version>`` and ``/usr/include/c++/<version>/<target-triple>``
429
430You can also figure this out by running
431
432.. code-block:: bash
433
434 $ echo | g++ -Wp,-v -x c++ - -fsyntax-only
435 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
436 ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../x86_64-linux-gnu/include"
437 #include "..." search starts here:
438 #include &lt;...&gt; search starts here:
439 /usr/include/c++/4.7
440 /usr/include/c++/4.7/x86_64-linux-gnu
441 /usr/include/c++/4.7/backward
442 /usr/lib/gcc/x86_64-linux-gnu/4.7/include
443 /usr/local/include
444 /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
445 /usr/include/x86_64-linux-gnu
446 /usr/include
447 End of search list.
448
449Note that the first two entries happen to be what we are looking for. This
450may not be correct on other platforms.
451
452We can now run CMake:
453
454.. code-block:: bash
455
456 $ CC=clang CXX=clang++ cmake -G "Unix Makefiles" \
457 -DLIBCXX_CXX_ABI=libstdc++ \
458 -DLIBCXX_CXX_ABI_INCLUDE_PATHS="/usr/include/c++/4.7/;/usr/include/c++/4.7/x86_64-linux-gnu/" \
459 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
460 <libc++-source-dir>
461
462
463You can also substitute ``-DLIBCXX_CXX_ABI=libsupc++``
464above, which will cause the library to be linked to libsupc++ instead
465of libstdc++, but this is only recommended if you know that you will
466never need to link against libstdc++ in the same executable as libc++.
467GCC ships libsupc++ separately but only as a static library. If a
468program also needs to link against libstdc++, it will provide its
469own copy of libsupc++ and this can lead to subtle problems.
470
471.. code-block:: bash
472
473 $ make cxx
474 $ make install
475
476You can now run clang with -stdlib=libc++.
Eric Fiseliera0733922016-06-02 02:16:28 +0000477
478
479.. _libcxxrt_ref:
480
481Using libcxxrt on Linux
482------------------------
483
484You will need to keep the source tree of `libcxxrt`_ available
485on your build machine and your copy of the libcxxrt shared library must
486be placed where your linker will find it.
487
488We can now run CMake like:
489
490.. code-block:: bash
491
492 $ CC=clang CXX=clang++ cmake -G "Unix Makefiles" \
493 -DLIBCXX_CXX_ABI=libcxxrt \
494 -DLIBCXX_CXX_ABI_INCLUDE_PATHS=path/to/libcxxrt-sources/src \
495 -DCMAKE_BUILD_TYPE=Release \
496 -DCMAKE_INSTALL_PREFIX=/usr \
497 <libc++-source-directory>
498 $ make cxx
499 $ make install
500
501Unfortunately you can't simply run clang with "-stdlib=libc++" at this point, as
502clang is set up to link for libc++ linked to libsupc++. To get around this
503you'll have to set up your linker yourself (or patch clang). For example,
504
505.. code-block:: bash
506
507 $ clang++ -stdlib=libc++ helloworld.cpp \
508 -nodefaultlibs -lc++ -lcxxrt -lm -lc -lgcc_s -lgcc
509
510Alternately, you could just add libcxxrt to your libraries list, which in most
511situations will give the same result:
512
513.. code-block:: bash
514
515 $ clang++ -stdlib=libc++ helloworld.cpp -lcxxrt
516
517.. _`libcxxrt`: https://github.com/pathscale/libcxxrt/
518
519
520Using a local ABI library installation
521---------------------------------------
522
523.. warning::
524 This is not recommended in almost all cases.
525
526These instructions should only be used when you can't install your ABI library.
527
528Normally you must link libc++ against a ABI shared library that the
529linker can find. If you want to build and test libc++ against an ABI
Louis Dionneecc89552019-10-01 20:34:50 +0000530library not in the linker's path you need to set
Eric Fiseliera0733922016-06-02 02:16:28 +0000531``-DLIBCXX_CXX_ABI_LIBRARY_PATH=/path/to/abi/lib`` when configuring CMake.
532
533An example build using libc++abi would look like:
534
535.. code-block:: bash
536
537 $ CC=clang CXX=clang++ cmake \
538 -DLIBCXX_CXX_ABI=libc++abi \
539 -DLIBCXX_CXX_ABI_INCLUDE_PATHS="/path/to/libcxxabi/include" \
540 -DLIBCXX_CXX_ABI_LIBRARY_PATH="/path/to/libcxxabi-build/lib" \
541 path/to/libcxx
542 $ make
543
544When testing libc++ LIT will automatically link against the proper ABI
545library.