diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-25 13:25:45 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-25 13:25:45 -0500 |
commit | 16c2a906b854e31d8b3d05d8478bd0f60388e68c (patch) | |
tree | d18d263a23077a7fd7613b8e712a4dea07fb5994 | |
parent | 86339ef088e9aac6cf52cf9022d7a5bd144d4c42 (diff) | |
download | llvm-16c2a906b854e31d8b3d05d8478bd0f60388e68c.zip llvm-16c2a906b854e31d8b3d05d8478bd0f60388e68c.tar.gz llvm-16c2a906b854e31d8b3d05d8478bd0f60388e68c.tar.bz2 |
[libc][fix] Add missing 'errno' header for the GPU libc
Summary:
The previous GPU `libc` patch added support for `atoi`. However, it
didn't also enable generating the errno header. This caused including it
to use the system's header which invariably will cause compiler
problems.
-rw-r--r-- | libc/config/gpu/entrypoints.txt | 3 | ||||
-rw-r--r-- | libc/config/gpu/headers.txt | 1 | ||||
-rw-r--r-- | libc/src/errno/libc_errno.cpp | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt index 69af9ff..5750fba 100644 --- a/libc/config/gpu/entrypoints.txt +++ b/libc/config/gpu/entrypoints.txt @@ -56,6 +56,9 @@ set(TARGET_LIBC_ENTRYPOINTS # stdlib.h entrypoints libc.src.stdlib.atoi + + # errno.h entrypoints + libc.src.errno.errno ) set(TARGET_LLVMLIBC_ENTRYPOINTS diff --git a/libc/config/gpu/headers.txt b/libc/config/gpu/headers.txt index fd753a4..1b77c97 100644 --- a/libc/config/gpu/headers.txt +++ b/libc/config/gpu/headers.txt @@ -1,5 +1,6 @@ set(TARGET_PUBLIC_HEADERS libc.include.ctype libc.include.string + libc.include.errno libc.include.stdlib ) diff --git a/libc/src/errno/libc_errno.cpp b/libc/src/errno/libc_errno.cpp index 26bd9d9..8cf77a8 100644 --- a/libc/src/errno/libc_errno.cpp +++ b/libc/src/errno/libc_errno.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "src/__support/macros/properties/architectures.h" +#include "libc_errno.h" namespace __llvm_libc { |