From 90cb37cc82ae98a96f8043aa5a38557a3da0c5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Wed, 4 Sep 2024 00:41:02 +0200 Subject: [PATCH] bazel run: synth/canonicalize nit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yosys-dependencies is now run during bazel run so that e.g. make memory does not first spit out lots of surprising output Signed-off-by: Øyvind Harboe --- deploy.tpl | 6 +++++- openroad.bzl | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy.tpl b/deploy.tpl index aad7c6f..90d219f 100644 --- a/deploy.tpl +++ b/deploy.tpl @@ -70,7 +70,11 @@ main() { cp --force "$make" "$dst/make" cp --force --no-preserve=all "$config" "$dst/config.mk" + if [[ "$make" == *synth* || "$make" == *canonicalize* ]]; then + "$dst/make" yosys-dependencies + fi + exit $? } -main --genfiles "${GENFILES}" --make "${MAKE}" --config "${CONFIG}" "$@" \ No newline at end of file +main --genfiles "${GENFILES}" --make "${MAKE}" --config "${CONFIG}" "$@" diff --git a/openroad.bzl b/openroad.bzl index 5bdea0d..950a2f6 100644 --- a/openroad.bzl +++ b/openroad.bzl @@ -552,7 +552,7 @@ def _yosys_impl(ctx, canonicalize, log_names = [], report_names = []): ctx.actions.expand_template( template = ctx.file._make_template, output = make, - substitutions = flow_substitutions(ctx) | yosys_substitutions(ctx) | {'"$@"': 'WORK_HOME="./{}" DESIGN_CONFIG="config.mk" {} "$@"'.format(ctx.label.package, "yosys-dependencies" if not canonicalize else "")}, + substitutions = flow_substitutions(ctx) | yosys_substitutions(ctx) | {'"$@"': 'WORK_HOME="./{}" DESIGN_CONFIG="config.mk" "$@"'.format(ctx.label.package)}, ) exe = ctx.actions.declare_file(ctx.attr.name + ".sh")