Skip to content

Commit 19bd211

Browse files
Port windows bootstrapping fix (#17225)
1 parent 4923b8d commit 19bd211

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

upb_generator/bootstrap_compiler.bzl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,14 @@ def _cmake_staleness_test(name, base_dir, src_files, proto_lib_deps, **kwargs):
126126
name = name + "_copy_gencode_%d" % genrule,
127127
outs = ["generated_sources/" + src],
128128
srcs = [name, name + "_minitable"],
129-
cmd = "mkdir -p $(@D); for src in $(SRCS); do cp -f $$src $(@D) || echo 'copy failed!'; done",
129+
cmd = """
130+
mkdir -p $(@D)
131+
for src in $(SRCS); do
132+
if [[ $$src == *%s ]]; then
133+
cp -f $$src $(@D) || echo 'copy failed!'
134+
fi
135+
done
136+
""" % src[src.rfind("/"):],
130137
)
131138

132139
# Keep bazel gencode in sync with our checked-in sources needed for cmake builds.

0 commit comments

Comments
 (0)