Skip to content

Commit

Permalink
Silence swiftmodule timestamp warnings
Browse files Browse the repository at this point in the history
As part of bazelbuild#13091 dsymtuil started producing these warnings:

```
warning: Timestamp mismatch for bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-7786d55448f4/bin/Modules/DependencyInjection/DependencyInjection.swiftmodule: 2021-03-05 13:54:33.542331246 and 1969-12-31 16:00:00.000000000
```

In general we're happily ignoring this to get hermetic outputs instead (it's being compared against the file modification timestamp)

This change disables this warning.

It appears this feature has been around for at least 3 years swiftlang/llvm-project@2dd9848 so we should be good for all the versions of Xcode we support.

Relevant logic: https://github.com/apple/llvm-project/blob/902bb11a46eb82e81d7e8b34450481e143a208b2/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp#L407-L421
  • Loading branch information
keith committed Mar 5, 2021
1 parent ae4cf19 commit 6afa594
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/osx/crosstool/wrapped_clang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ int main(int argc, char *argv[]) {
RunSubProcess(invocation_args);

std::vector<std::string> dsymutil_args = {
"/usr/bin/xcrun", "dsymutil", linked_binary, "-o", dsym_path, "--flat"};
"/usr/bin/xcrun", "dsymutil", linked_binary, "-o", dsym_path, "--flat",
"--no-swiftmodule-timestamp"};
ExecProcess(dsymutil_args);
std::cerr << "ExecProcess should not return. Please fix!\n";
abort();
Expand Down

0 comments on commit 6afa594

Please sign in to comment.