Skip to content
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

Compilation: use mtime for timestamp macro #791

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

danielsan901998
Copy link
Contributor

resolve #711
Added a new argument to generateBuiltinMacros to pass an optional timestamp that is used in the case of not having a valid epoch passed as environment variable, to generate the timestamp from a path a new function called generateBuiltinMacrosFromPath is created and is used in Driver for each source file instead of having the same builtin.
Changed generateDateAndTime to make the timestamp argument optional, since the stat can fail, and following GCC behavior it will expand timestamp to "??? ??? ?? ??:??:?? ????"

Copy link
Owner

@Vexu Vexu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just needs a few small adjustments.

src/aro/Compilation.zig Outdated Show resolved Hide resolved
src/aro/Compilation.zig Outdated Show resolved Hide resolved
src/aro/Compilation.zig Outdated Show resolved Hide resolved
@danielsan901998
Copy link
Contributor Author

Changes applied

@Vexu Vexu merged commit 9020bdf into Vexu:master Oct 18, 2024
3 checks passed
@Vexu
Copy link
Owner

Vexu commented Oct 18, 2024

Thanks!

@danielsan901998 danielsan901998 deleted the timestamp branch October 18, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__TIMESTAMP__ macro has incorrect value
2 participants