HomePhabricator

[llvm-elfabi] Add flag to preserve timestamp when output is the same

Authored by haowei on Dec 8 2020, 5:23 PM.

Description

[llvm-elfabi] Add flag to preserve timestamp when output is the same

This change adds '--write-if-changed' flag to llvm-elfabi tool. When
enabled, llvm-elfabi will not overwrite the existing file if the
content of the file will not be changed, which preserves the
timestamp.

Differential Revision: https://reviews.llvm.org/D92902

Details