Skip to content

Commit e4a3c51

Browse files
committed
[bazel] Use copy_file rule for zlib-ng
This avoids cp usage for potential windows / PATH-less builds
1 parent 83dd7d9 commit e4a3c51

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utils/bazel/third_party_build/zlib-ng.BUILD

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://llvm.org/LICENSE.txt for license information.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
5-
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
5+
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
66

77
package(
88
default_visibility = ["//visibility:public"],
@@ -20,12 +20,12 @@ config_setting(
2020
flag_values = {":llvm_enable_zlib": "true"},
2121
)
2222

23-
genrule(
23+
copy_file(
2424
# The input template is identical to the CMake output.
2525
name = "zconf_gen",
26-
srcs = ["zconf.h.in"],
27-
outs = ["zconf.h"],
28-
cmd = "cp $(SRCS) $(OUTS)",
26+
src = "zconf.h.in",
27+
out = "zconf.h",
28+
allow_symlink = True,
2929
)
3030

3131
cc_library(

0 commit comments

Comments
 (0)