[libc][docs] Dynamically generate time.h documentation (#210197)
Removed the static time.rst file. Added time to docgen_list in libc/docs/CMakeLists.txt. Created libc/utils/docgen/time.yaml to define the functions. Assisted-by: Automated tooling, human reviewed.
This commit is contained in:
parent
250f791e70
commit
89f5334990
3 changed files with 69 additions and 109 deletions
|
|
@ -86,6 +86,7 @@ if (SPHINX_FOUND)
|
|||
sys/wait
|
||||
termios
|
||||
threads
|
||||
time
|
||||
uchar
|
||||
unistd
|
||||
wchar
|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
======
|
||||
time.h
|
||||
======
|
||||
|
||||
---------------
|
||||
Source location
|
||||
---------------
|
||||
|
||||
- The main source for time functions is located at: ``libc/src/time``
|
||||
|
||||
---------------------
|
||||
Implementation Status
|
||||
---------------------
|
||||
|
||||
* To check date and time functions enabled for Linux:
|
||||
|
||||
- `linux-x86_64 <https://github.com/llvm/llvm-project/tree/main/libc/config/linux/x86_64/entrypoints.txt>`_
|
||||
|
||||
- `linux-aarch64 <https://github.com/llvm/llvm-project/tree/main/libc/config/linux/aarch64/entrypoints.txt>`_
|
||||
|
||||
- `linux-aarch32 <https://github.com/llvm/llvm-project/tree/main/libc/config/linux/arm/entrypoints.txt>`_
|
||||
|
||||
- `linux-riscv and linux-riscv32 <https://github.com/llvm/llvm-project/tree/main/libc/config/linux/riscv/entrypoints.txt>`_
|
||||
|
||||
* To check date and time functions enabled for Windows:
|
||||
|
||||
- `windows-x86_64 <https://github.com/llvm/llvm-project/tree/main/libc/config/windows/entrypoints.txt>`_
|
||||
|
||||
- windows-aarch64 - to be added
|
||||
|
||||
* To check date and time functions enabled for macOS:
|
||||
|
||||
- `darwin-x86_64 <https://github.com/llvm/llvm-project/tree/main/libc/config/darwin/x86_64/entrypoints.txt>`_
|
||||
|
||||
- `darwin-aarch64 <https://github.com/llvm/llvm-project/tree/main/libc/config/darwin/aarch64/entrypoints.txt>`_
|
||||
|
||||
* To check date and time functions enabled for GPU:
|
||||
|
||||
- `amdgpu-entrypoints <https://github.com/llvm/llvm-project/tree/main/libc/config/gpu/amdgpu/entrypoints.txt>`_
|
||||
|
||||
- `nvptx-entrypoints <https://github.com/llvm/llvm-project/tree/main/libc/config/gpu/nvptx/entrypoints.txt>`_
|
||||
|
||||
* To check date and time functions enabled for embedded system:
|
||||
|
||||
- `baremetal-aarch64 <https://github.com/llvm/llvm-project/tree/main/libc/config/baremetal/aarch64/entrypoints.txt>`_
|
||||
|
||||
- `baremetal-aarch32 <https://github.com/llvm/llvm-project/tree/main/libc/config/baremetal/arm/entrypoints.txt>`_
|
||||
|
||||
- `baremetal-riscv32 <https://github.com/llvm/llvm-project/tree/main/libc/config/baremetal/riscv/entrypoints.txt>`_
|
||||
|
||||
+---------------------+-----------------------------------------------+-------------------+-------------------+-----------------------------+---------+---------+
|
||||
| <Func> | Linux | Windows | MacOS | Embedded | GPU |
|
||||
| +---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| | x86_64 | aarch64 | aarch32 | riscv64/riscv32 | x86_64 | aarch64 | x86_64 | aarch64 | aarch64 | aarch32 | riscv32 | AMD | nVidia |
|
||||
+=====================+=========+=========+=========+=================+=========+=========+=========+=========+=========+=========+=========+=========+=========+
|
||||
| asctime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| asctime_r | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| ctime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| ctime_r | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| clock | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| clock_getcpuclockid | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| clock_getres | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| clock_gettime | |check| | |check| | | |check| | | | | | | | | |check| | |check| |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| clock_nanosleep | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| clock_settime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| difftime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| getdate | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| gmtime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| gmtime_r | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| localtime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| localtime_r | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| mktime | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| nanosleep | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| strftime | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| strptime | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| time | |check| | |check| | | |check| | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| timer_create | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| timer_delete | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| timer_gettime | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| timer_getoverrun | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| timer_settime | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
| tzset | | | | | | | | | | | | | |
|
||||
+---------------------+---------+---------+---------+-----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
|
||||
68
libc/utils/docgen/time.yaml
Normal file
68
libc/utils/docgen/time.yaml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
functions:
|
||||
asctime:
|
||||
c-definition: 7.27.2.1
|
||||
in-latest-posix: ''
|
||||
asctime_r:
|
||||
in-latest-posix: ''
|
||||
ctime:
|
||||
c-definition: 7.27.2.2
|
||||
in-latest-posix: ''
|
||||
ctime_r:
|
||||
in-latest-posix: ''
|
||||
clock:
|
||||
c-definition: 7.27.2.1
|
||||
in-latest-posix: ''
|
||||
clock_getcpuclockid:
|
||||
in-latest-posix: ''
|
||||
clock_getres:
|
||||
in-latest-posix: ''
|
||||
clock_gettime:
|
||||
in-latest-posix: ''
|
||||
clock_nanosleep:
|
||||
in-latest-posix: ''
|
||||
clock_settime:
|
||||
in-latest-posix: ''
|
||||
difftime:
|
||||
c-definition: 7.27.2.2
|
||||
in-latest-posix: ''
|
||||
getdate:
|
||||
in-latest-posix: ''
|
||||
gmtime:
|
||||
c-definition: 7.27.2.3
|
||||
in-latest-posix: ''
|
||||
gmtime_r:
|
||||
in-latest-posix: ''
|
||||
localtime:
|
||||
c-definition: 7.27.2.4
|
||||
in-latest-posix: ''
|
||||
localtime_r:
|
||||
in-latest-posix: ''
|
||||
mktime:
|
||||
c-definition: 7.27.2.3
|
||||
in-latest-posix: ''
|
||||
nanosleep:
|
||||
in-latest-posix: ''
|
||||
strftime:
|
||||
c-definition: 7.27.3.5
|
||||
in-latest-posix: ''
|
||||
strftime_l:
|
||||
in-latest-posix: ''
|
||||
strptime:
|
||||
in-latest-posix: ''
|
||||
time:
|
||||
c-definition: 7.27.2.4
|
||||
in-latest-posix: ''
|
||||
timespec_get:
|
||||
c-definition: 7.27.2.5
|
||||
timer_create:
|
||||
in-latest-posix: ''
|
||||
timer_delete:
|
||||
in-latest-posix: ''
|
||||
timer_gettime:
|
||||
in-latest-posix: ''
|
||||
timer_getoverrun:
|
||||
in-latest-posix: ''
|
||||
timer_settime:
|
||||
in-latest-posix: ''
|
||||
tzset:
|
||||
in-latest-posix: ''
|
||||
Loading…
Reference in a new issue