blob: 20b614f177bc684f21f13b9fc09d1a462c7119ce [file] [log] [blame]
Marek Kurdejd5bc4d92020-12-02 08:52:35 +01001.. _ContributingToLibcxx:
2
3======================
4Contributing to libc++
5======================
6
7.. contents::
8 :local:
9
10Please read `this document <https://www.llvm.org/docs/Contributing.html>`__ on general rules to contribute to LLVM projects.
11
12Tasks and processes
13===================
14
15This file contains notes about various tasks and processes specific to libc++.
16
Louis Dionne31781652021-01-08 17:23:16 -050017Looking for pre-existing reviews
18================================
19
20Before you start working on any feature, please take a look at the open reviews
21to avoid duplicating someone else's work. You can do that by going to the website
22where code reviews are held, `Differential <https://reviews.llvm.org/differential>`__,
23and clicking on ``Libc++ Open Reviews`` in the sidebar to the left. If you see
24that your feature is already being worked on, please consider chiming in instead
25of duplicating work!
26
Marek Kurdejd5bc4d92020-12-02 08:52:35 +010027Post-Release TODO
28=================
29
30After branching for an LLVM release:
31
321. Update ``_LIBCPP_VERSION`` in ``include/__config``
332. Update the ``include/__libcpp_version`` file
343. Update the version number in ``docs/conf.py``
35
Marek Kurdejf14302f2020-12-10 08:37:21 +010036Modifying feature test macros
37=============================
38
39When adding or updating feature test macros, you should update the corresponding tests.
40To do that, modify ``feature_test_macros`` table in the script ``utils/generate_feature_test_macro_components.py``, run it, and commit updated files.
41
Marek Kurdejd5bc4d92020-12-02 08:52:35 +010042Adding a new header TODO
43========================
44
45When adding a new header to libc++:
46
471. Add a test under ``test/libcxx`` that the new header defines ``_LIBCPP_VERSION``. See ``test/libcxx/algorithms/version.pass.cpp`` for an example.
Marek Kurdejf14302f2020-12-10 08:37:21 +0100482. Run ``python utils/generate_header_tests.py``, verify and commit the modifications.
Marek Kurdejd5bc4d92020-12-02 08:52:35 +0100493. Create a submodule in ``include/module.modulemap`` for the new header.
504. Update the ``include/CMakeLists.txt`` file to include the new header.
51
52Exporting new symbols from the library
53======================================
54
55When exporting new symbols from libc++, one must update the ABI lists located in ``lib/abi``.
56To test whether the lists are up-to-date, please run the target ``check-cxx-abilist``.
57To regenerate the lists, use the target ``generate-cxx-abilist``.