Skip to content

Commit 9c65b6d

Browse files
committed
fix generated header leaking
1 parent 33ad9a5 commit 9c65b6d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

third_party/check.BUILD

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ load("@rules_swiftnav//tools:configure_file.bzl", "configure_file")
1212

1313
configure_file(
1414
name = "config_h",
15-
out = "config.h",
15+
# check_gendir ensures that files do not leak into the relative path of external targets
16+
out = "check_gendir/config.h",
1617
template = "cmake/config.h.in",
1718
vars = {
1819
"HAVE_INT16_T": "1",
@@ -105,7 +106,7 @@ configure_file(
105106

106107
configure_file(
107108
name = "check_h",
108-
out = "check.h",
109+
out = "check_gendir/check.h",
109110
template = "src/check.h.in",
110111
vars = {
111112
"CHECK_MAJOR_VERSION": "(0)",
@@ -118,7 +119,7 @@ configure_file(
118119

119120
configure_file(
120121
name = "check_stdint_h",
121-
out = "check_stdint.h",
122+
out = "check_gendir/check_stdint.h",
122123
template = "cmake/check_stdint.h.in",
123124
vars = {
124125
"HAVE_STDINT_H": "1",
@@ -153,8 +154,8 @@ cc_library(
153154
":check_h",
154155
":check_stdint_h",
155156
],
156-
include_prefix = ".",
157157
includes = [
158+
"check_gendir",
158159
"src",
159160
],
160161
linkopts = ["-lpthread"],

0 commit comments

Comments
 (0)