[llvm-branch-commits] [llvm] 51a292d - [gn build] Switch copy_bundle_data from pax to cpio
Nico Weber via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 30 11:03:30 PST 2020
Author: Nico Weber
Date: 2020-12-30T13:59:03-05:00
New Revision: 51a292d994535d14af1873f09534a352da1d5456
URL: https://github.com/llvm/llvm-project/commit/51a292d994535d14af1873f09534a352da1d5456
DIFF: https://github.com/llvm/llvm-project/commit/51a292d994535d14af1873f09534a352da1d5456.diff
LOG: [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.
Added:
Modified:
llvm/utils/gn/build/toolchain/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn
index 570ab1d31fdd..d01cad98e190 100644
--- a/llvm/utils/gn/build/toolchain/BUILD.gn
+++ b/llvm/utils/gn/build/toolchain/BUILD.gn
@@ -143,9 +143,9 @@ template("unix_toolchain") {
if (current_os == "ios" || current_os == "mac") {
tool("copy_bundle_data") {
- # http://serverfault.com/q/209888/43689
- _copydir = "mkdir -p {{output}} && cd {{source}} && " +
- "pax -rwl . \"\$OLDPWD\"/{{output}}"
+ # https://github.com/nico/hack/blob/master/notes/copydir.md
+ _copydir = "cd {{source}} && " +
+ "find . | cpio -pdl \"\$OLDPWD\"/{{output}} 2>/dev/null"
command = "rm -rf {{output}} && if [[ -d {{source}} ]]; then " +
_copydir + "; else " + copy_command + "; fi"
description = "COPY_BUNDLE_DATA {{source}} {{output}}"
More information about the llvm-branch-commits
mailing list