Skip to content

Commit eadb436

Browse files
Preserve file timestamps when copying files in the install target (#581)
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. This is a 2nd attempt of #530 but much simpler thanks to @abrown 's build work
1 parent e9524a0 commit eadb436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ endif
816816

817817
install: finish
818818
mkdir -p "$(INSTALL_DIR)"
819-
cp -r "$(SYSROOT)/lib" "$(SYSROOT)/share" "$(SYSROOT)/include" "$(INSTALL_DIR)"
819+
cp -p -r "$(SYSROOT)/lib" "$(SYSROOT)/share" "$(SYSROOT)/include" "$(INSTALL_DIR)"
820820

821821
DEFINED_SYMBOLS = $(SYSROOT_SHARE)/defined-symbols.txt
822822
UNDEFINED_SYMBOLS = $(SYSROOT_SHARE)/undefined-symbols.txt

0 commit comments

Comments
 (0)