Contributing.rst revision 1.1.1.1.2.2 1 1.1.1.1.2.2 cjep .. _ContributingToLibcxx:
2 1.1.1.1.2.2 cjep
3 1.1.1.1.2.2 cjep ======================
4 1.1.1.1.2.2 cjep Contributing to libc++
5 1.1.1.1.2.2 cjep ======================
6 1.1.1.1.2.2 cjep
7 1.1.1.1.2.2 cjep .. contents::
8 1.1.1.1.2.2 cjep :local:
9 1.1.1.1.2.2 cjep
10 1.1.1.1.2.2 cjep Please read `this document <https://www.llvm.org/docs/Contributing.html>`__ on general rules to contribute to LLVM projects.
11 1.1.1.1.2.2 cjep
12 1.1.1.1.2.2 cjep Tasks and processes
13 1.1.1.1.2.2 cjep ===================
14 1.1.1.1.2.2 cjep
15 1.1.1.1.2.2 cjep This file contains notes about various tasks and processes specific to libc++.
16 1.1.1.1.2.2 cjep
17 1.1.1.1.2.2 cjep Looking for pre-existing reviews
18 1.1.1.1.2.2 cjep ================================
19 1.1.1.1.2.2 cjep
20 1.1.1.1.2.2 cjep Before you start working on any feature, please take a look at the open reviews
21 1.1.1.1.2.2 cjep to avoid duplicating someone else's work. You can do that by going to the website
22 1.1.1.1.2.2 cjep where code reviews are held, `Differential <https://reviews.llvm.org/differential>`__,
23 1.1.1.1.2.2 cjep and clicking on ``Libc++ Open Reviews`` in the sidebar to the left. If you see
24 1.1.1.1.2.2 cjep that your feature is already being worked on, please consider chiming in instead
25 1.1.1.1.2.2 cjep of duplicating work!
26 1.1.1.1.2.2 cjep
27 1.1.1.1.2.2 cjep Post-Release TODO
28 1.1.1.1.2.2 cjep =================
29 1.1.1.1.2.2 cjep
30 1.1.1.1.2.2 cjep After branching for an LLVM release:
31 1.1.1.1.2.2 cjep
32 1.1.1.1.2.2 cjep 1. Update ``_LIBCPP_VERSION`` in ``include/__config``
33 1.1.1.1.2.2 cjep 2. Update the ``include/__libcpp_version`` file
34 1.1.1.1.2.2 cjep 3. Update the version number in ``docs/conf.py``
35 1.1.1.1.2.2 cjep
36 1.1.1.1.2.2 cjep Modifying feature-test macros
37 1.1.1.1.2.2 cjep =============================
38 1.1.1.1.2.2 cjep
39 1.1.1.1.2.2 cjep When adding or updating feature-test macros, you should update the corresponding tests.
40 1.1.1.1.2.2 cjep To do that, modify ``feature_test_macros`` table in the script
41 1.1.1.1.2.2 cjep ``utils/generate_feature_test_macro_components.py``, run it, and commit updated
42 1.1.1.1.2.2 cjep files. Running ``utils/generate_feature_test_macro_components.py`` should never
43 1.1.1.1.2.2 cjep generate diffs in a clean checkout; feel free to run it in your local checkout
44 1.1.1.1.2.2 cjep any time you want.
45 1.1.1.1.2.2 cjep
46 1.1.1.1.2.2 cjep
47 1.1.1.1.2.2 cjep Adding a new header TODO
48 1.1.1.1.2.2 cjep ========================
49 1.1.1.1.2.2 cjep
50 1.1.1.1.2.2 cjep When adding a new header to libc++:
51 1.1.1.1.2.2 cjep
52 1.1.1.1.2.2 cjep 1. Add a test under ``test/libcxx`` that the new header defines ``_LIBCPP_VERSION``. See ``test/libcxx/algorithms/version.pass.cpp`` for an example.
53 1.1.1.1.2.2 cjep 2. Run ``python utils/generate_header_tests.py``; verify and commit the changes.
54 1.1.1.1.2.2 cjep 3. Modify ``python utils/generate_header_inclusion_tests.py``; run it; verify and commit the changes.
55 1.1.1.1.2.2 cjep 4. Create a submodule in ``include/module.modulemap`` for the new header.
56 1.1.1.1.2.2 cjep 5. Update the ``include/CMakeLists.txt`` file to include the new header.
57 1.1.1.1.2.2 cjep
58 1.1.1.1.2.2 cjep Exporting new symbols from the library
59 1.1.1.1.2.2 cjep ======================================
60 1.1.1.1.2.2 cjep
61 1.1.1.1.2.2 cjep When exporting new symbols from libc++, you must update the ABI lists located in ``lib/abi``.
62 1.1.1.1.2.2 cjep To test whether the lists are up-to-date, please run the target ``check-cxx-abilist``.
63 1.1.1.1.2.2 cjep To regenerate the lists, use the target ``generate-cxx-abilist``.
64 1.1.1.1.2.2 cjep The ABI lists must be updated for all supported platforms; currently Linux and
65 1.1.1.1.2.2 cjep Apple. If you don't have access to one of these platforms, you can download an
66 1.1.1.1.2.2 cjep updated list from the failed build at
67 1.1.1.1.2.2 cjep `Buildkite <https://buildkite.com/llvm-project/libcxx-ci>`__.
68 1.1.1.1.2.2 cjep Look for the failed build and select the ``artifacts`` tab. There, download the
69 1.1.1.1.2.2 cjep abilist for the platform, e.g.:
70 1.1.1.1.2.2 cjep
71 1.1.1.1.2.2 cjep * C++20 for the Linux platform.
72 1.1.1.1.2.2 cjep * MacOS C++20 for the Apple platform.
73