Skip to content

[libc] Include time.h in baremetal targets #85026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libc/config/baremetal/api.td
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ def StringAPI : PublicAPI<"string.h"> {
let Types = ["size_t"];
}

def TimeAPI : PublicAPI<"time.h"> {
let Types = [
"clock_t",
"time_t",
"struct tm",
"struct timespec",
];
}

def UCharAPI : PublicAPI<"uchar.h"> {
let Types = ["mbstate_t"];
}
3 changes: 3 additions & 0 deletions libc/config/baremetal/arm/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.strtoll
libc.src.stdlib.strtoul
libc.src.stdlib.strtoull

# time.h entrypoints
libc.src.time.difftime
)

set(TARGET_LIBM_ENTRYPOINTS
Expand Down
1 change: 1 addition & 0 deletions libc/config/baremetal/arm/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ set(TARGET_PUBLIC_HEADERS
libc.include.string
libc.include.strings
libc.include.sys_queue
libc.include.time
libc.include.uchar
)
3 changes: 3 additions & 0 deletions libc/config/baremetal/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.strtoll
libc.src.stdlib.strtoul
libc.src.stdlib.strtoull

# time.h entrypoints
libc.src.time.difftime
)

set(TARGET_LIBM_ENTRYPOINTS
Expand Down
1 change: 1 addition & 0 deletions libc/config/baremetal/riscv/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ set(TARGET_PUBLIC_HEADERS
libc.include.string
libc.include.strings
libc.include.sys_queue
libc.include.time
libc.include.uchar
)