Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve timestamps for installed headers to improve incremental builds
This change makes it so that the timestamps of installed header files are only updated when the contents of the header files change. This change is beneficial for incremental builds of projects depending on wasi-libc. For example, the Swift project builds wasi-libc as part of its build process, and this change reduces the number of build products in the Swift build that are unnecessarily rebuilt. The following commands can be used to verify the changes: ```bash make clean && make -j16 && ( cd sysroot && find . -name "*.h" -type f -exec stat -c '%n %y' {} \; ) > sysroot.v1.timestamp && \ make -j16 && ( cd sysroot && find . -name "*.h" -type f -exec stat -c '%n %y' {} \; ) > sysroot.v2.timestamp diff sysroot.v1.timestamp sysroot.v2.timestamp ``` The diff should show no changes in timestamps.
- Loading branch information