Skip to content

Commit 51a292d

Browse files
committed
[gn build] Switch copy_bundle_data from pax to cpio
This will hopefully fix the build not becoming clean when using Ninja 1.9+. Ninja 1.9 enabled high-resolution time stamps, but pax doesn't correctly set high-resolution timestamps on its output. See https://github.com/nico/hack/blob/master/notes/copydir.md for a detailed writeup of problem and alternatives.
1 parent 277ebe4 commit 51a292d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎llvm/utils/gn/build/toolchain/BUILD.gn‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ template("unix_toolchain") {
143143

144144
if (current_os == "ios" || current_os == "mac") {
145145
tool("copy_bundle_data") {
146-
# http://serverfault.com/q/209888/43689
147-
_copydir = "mkdir -p {{output}} && cd {{source}} && " +
148-
"pax -rwl . \"\$OLDPWD\"/{{output}}"
146+
# https://github.com/nico/hack/blob/master/notes/copydir.md
147+
_copydir = "cd {{source}} && " +
148+
"find . | cpio -pdl \"\$OLDPWD\"/{{output}} 2>/dev/null"
149149
command = "rm -rf {{output}} && if [[ -d {{source}} ]]; then " +
150150
_copydir + "; else " + copy_command + "; fi"
151151
description = "COPY_BUNDLE_DATA {{source}} {{output}}"

0 commit comments

Comments
 (0)