Skip to content

Commit

Permalink
openroad.bzl: merge for loops
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz committed Feb 28, 2024
1 parent 8ef36c7 commit 11979ab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def build_openroad(

stage_sources["route"] = stage_sources.get("route", []) + outs["cts"]

for stage in name_to_stage:
for stage in stages:
make_pattern = Label("//:" + stage + "-bazel.mk")
stage_sources[stage] = ([make_pattern] +
all_sources +
Expand All @@ -263,7 +263,6 @@ def build_openroad(
stage_sources.get(stage, []))
stage_args[stage] = ["make"] + ["MAKE_PATTERN=$(location " + str(make_pattern) + ")"] + base_args + stage_args.get(stage, [])

for stage in stages:
native.genrule(
name = target_name + "_" + stage + "_make_script",
tools = [],
Expand All @@ -280,7 +279,7 @@ def build_openroad(
native.sh_binary(
name = target_name + "_" + stage + "_make",
srcs = ["//:" + target_name + "_" + stage + "_make_script"],
data = [Label("//:orfs"), Label("//:" + stage + "-bazel.mk"), Label("//:config.mk")],
data = [Label("//:orfs"), make_pattern, Label("//:config.mk")],
deps = ["@bazel_tools//tools/bash/runfiles"],
)

Expand Down

0 comments on commit 11979ab

Please sign in to comment.