xref: /aosp_15_r20/external/pigweed/third_party/llvm_libcxx/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_third_party_llvm_libcxx:
2*61c4878aSAndroid Build Coastguard Worker
3*61c4878aSAndroid Build Coastguard Worker===========
4*61c4878aSAndroid Build Coastguard WorkerLLVM libcxx
5*61c4878aSAndroid Build Coastguard Worker===========
6*61c4878aSAndroid Build Coastguard WorkerThe ``$dir_pw_third_party/llvm_libcxx/`` module provides various helpers to
7*61c4878aSAndroid Build Coastguard Workeroptionally use LLVM libcxx with :ref:`module-pw_libcxx`.
8*61c4878aSAndroid Build Coastguard Worker
9*61c4878aSAndroid Build Coastguard Worker---------------------------
10*61c4878aSAndroid Build Coastguard WorkerUsing upstream LLVM libcxx
11*61c4878aSAndroid Build Coastguard Worker---------------------------
12*61c4878aSAndroid Build Coastguard WorkerIf you want to use LLVM libcxx, you must do the following:
13*61c4878aSAndroid Build Coastguard Worker
14*61c4878aSAndroid Build Coastguard WorkerSubmodule
15*61c4878aSAndroid Build Coastguard Worker=========
16*61c4878aSAndroid Build Coastguard WorkerAdd LLVM libcxx to your workspace with the following command.
17*61c4878aSAndroid Build Coastguard Worker
18*61c4878aSAndroid Build Coastguard Worker.. code-block:: sh
19*61c4878aSAndroid Build Coastguard Worker
20*61c4878aSAndroid Build Coastguard Worker   git submodule add https://llvm.googlesource.com/llvm-project/libcxx \
21*61c4878aSAndroid Build Coastguard Worker     third_party/llvm_libcxx/src
22*61c4878aSAndroid Build Coastguard Worker
23*61c4878aSAndroid Build Coastguard WorkerNote, this git repository is maintained by Google and is a slice of upstream
24*61c4878aSAndroid Build Coastguard WorkerLLVM including only the libcxx subdirectory.
25*61c4878aSAndroid Build Coastguard Worker
26*61c4878aSAndroid Build Coastguard WorkerGN
27*61c4878aSAndroid Build Coastguard Worker==
28*61c4878aSAndroid Build Coastguard Worker* Set the GN var ``dir_pw_third_party_llvm_libcxx`` to the location of the LLVM
29*61c4878aSAndroid Build Coastguard Worker  libcxx source. If you used the command above, this will be
30*61c4878aSAndroid Build Coastguard Worker  ``//third_party/llvm_libcxx/src``
31*61c4878aSAndroid Build Coastguard Worker
32*61c4878aSAndroid Build Coastguard Worker  This can be set in your args.gn or .gn file like:
33*61c4878aSAndroid Build Coastguard Worker  ``dir_pw_third_party_llvm_libcxx = "//third_party/llvm_libcxx_src"``
34*61c4878aSAndroid Build Coastguard Worker
35*61c4878aSAndroid Build Coastguard Worker------
36*61c4878aSAndroid Build Coastguard WorkerStatus
37*61c4878aSAndroid Build Coastguard Worker------
38*61c4878aSAndroid Build Coastguard Workerpw_libcxx's llvm_libcxx integration is under active development.
39