-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc] Make use of 32-bit time_t a config option #102012
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//===-- Definition of the type time_t -------------------------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_LIBC_TYPES_TIME_T_H | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file and There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point – which must mean that nothing at all in the build is currently using this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you try with full build mode? I found out the header guard issue from failed tests when trying your PR in full build mode. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, it was in the tests? That explains it. I'm mostly using full build mode, because I'm testing this libc on bare metal. But I haven't figured out how to run the tests in that setup yet, so that's why I didn't spot this. Good thing you did. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's good that we can exercise the same code paths on multiple targets. It does help to find hidden issues. |
||
#define LLVM_LIBC_TYPES_TIME_T_H | ||
|
||
typedef __INT32_TYPE__ time_t; | ||
|
||
#endif // LLVM_LIBC_TYPES_TIME_T_H |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//===-- Definition of the type time_t -------------------------------------===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_LIBC_TYPES_TIME_T_H | ||
#define LLVM_LIBC_TYPES_TIME_T_H | ||
|
||
typedef __INT64_TYPE__ time_t; | ||
|
||
#endif // LLVM_LIBC_TYPES_TIME_T_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only pass the compile flag in full build mode: