Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up the Bazel sed command. #4720

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix up the Bazel sed command.
  • Loading branch information
fruffy committed Jun 12, 2024
commit 0610d1dfa726932612b1c448eabaa7a2da50f436
11 changes: 5 additions & 6 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ genrule(
outs = ["config.h"],
# TODO: We should actually check these properly instead of just #undefing them.
# Maybe select() can help here?
cmd = " | ".join([
"sed 's|cmakedefine|define|g' < $(SRCS)",
"sed 's|define HAVE_LIBGC 1|undef HAVE_LIBGC|g'",
"sed 's|define HAVE_LIBBACKTRACE 1|undef HAVE_LIBBACKTRACE|g' > $(OUTS)",
"sed 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' > $(OUTS)",
]),
cmd = "sed -e 's|cmakedefine|define|g' \
-e 's|define HAVE_LIBGC 1|undef HAVE_LIBGC|g' \
-e 's|define HAVE_LIBBACKTRACE 1|undef HAVE_LIBBACKTRACE|g' \
-e 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' \
< $(SRCS) > $(OUTS)",
visibility = ["//visibility:private"],
)

Expand Down
Loading