Skip to content

Commit

Permalink
Port windows bootstrapping fix (#17225)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkruskal-google authored Jun 25, 2024
1 parent 4923b8d commit 19bd211
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion upb_generator/bootstrap_compiler.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ def _cmake_staleness_test(name, base_dir, src_files, proto_lib_deps, **kwargs):
name = name + "_copy_gencode_%d" % genrule,
outs = ["generated_sources/" + src],
srcs = [name, name + "_minitable"],
cmd = "mkdir -p $(@D); for src in $(SRCS); do cp -f $$src $(@D) || echo 'copy failed!'; done",
cmd = """
mkdir -p $(@D)
for src in $(SRCS); do
if [[ $$src == *%s ]]; then
cp -f $$src $(@D) || echo 'copy failed!'
fi
done
""" % src[src.rfind("/"):],
)

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

0 comments on commit 19bd211

Please sign in to comment.