blob: f397f4ce8831b21f9b07f73135b103bc285dffff [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
17Post-Release TODO
18=================
19
20After branching for an LLVM release:
21
221. Update ``_LIBCPP_VERSION`` in ``include/__config``
232. Update the ``include/__libcpp_version`` file
243. Update the version number in ``docs/conf.py``
25
Marek Kurdejf14302f2020-12-10 08:37:21 +010026Modifying feature test macros
27=============================
28
29When adding or updating feature test macros, you should update the corresponding tests.
30To do that, modify ``feature_test_macros`` table in the script ``utils/generate_feature_test_macro_components.py``, run it, and commit updated files.
31
Marek Kurdejd5bc4d92020-12-02 08:52:35 +010032Adding a new header TODO
33========================
34
35When adding a new header to libc++:
36
371. 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 +0100382. Run ``python utils/generate_header_tests.py``, verify and commit the modifications.
Marek Kurdejd5bc4d92020-12-02 08:52:35 +0100393. Create a submodule in ``include/module.modulemap`` for the new header.
404. Update the ``include/CMakeLists.txt`` file to include the new header.
41
42Exporting new symbols from the library
43======================================
44
45When exporting new symbols from libc++, one must update the ABI lists located in ``lib/abi``.
46To test whether the lists are up-to-date, please run the target ``check-cxx-abilist``.
47To regenerate the lists, use the target ``generate-cxx-abilist``.