Skip to content

Commit

Permalink
openroad.bzl: rework wrap_args()
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz authored and oharboe committed Feb 13, 2024
1 parent ba7d28c commit 97424d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ def filter(iterable, func):
return result

def wrap_args(args):
return map(lambda arg: '"' + arg + '"' if (' ' in arg or '\\$$' in arg or '=(' in arg) else arg, args)
wrapped_args = []

for arg in args:
splt = arg.split("=", 1)
if (len(splt) == 2):
if (" " in splt[1] and "DESIGN_CONFIG" != splt[0]):
wrapped_args.append(splt[0] + "='" + splt[1] + "'")
else:
wrapped_args.append(arg)
else:
wrapped_args.append(arg)
return wrapped_args

def build_openroad(
name,
Expand Down

0 comments on commit 97424d5

Please sign in to comment.