[driver] Explicitly specify `-fbuild-session-timestamp` in seconds.
authorVolodymyr Sapsai <vsapsai@apple.com>
Wed, 6 Oct 2021 02:37:32 +0000 (19:37 -0700)
committerVolodymyr Sapsai <vsapsai@apple.com>
Tue, 19 Oct 2021 20:30:26 +0000 (13:30 -0700)
commit91e19f66e51ac3fda2309f5e67b02fcccd4d58a0
treec4d013ae5f500ba0a73e9e961ab75f61699c2e16
parent5e004b03f72a17f916b93792eb778dfa9e7a09cc
[driver] Explicitly specify `-fbuild-session-timestamp` in seconds.

Representation of the file's last modification time depends on the file
system and isn't guaranteed to be in seconds. Cast to seconds explicitly
and tighten the test case to check the magnitude of the calculated
value, so we can catch passing milliseconds or nanoseconds.

rdar://83915615

Differential Revision: https://reviews.llvm.org/D111205
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/modules.m