1
0
Fork 0
mirror of https://git.sr.ht/~kivikakk/niar synced 2024-12-22 23:52:25 +00:00

cxxrtl: assume Zig build uses cxxrtl_o_path list.

This commit is contained in:
Asherah Connor 2024-06-16 17:44:58 +03:00
parent 5c6700effb
commit e6cada5f48

View file

@ -175,16 +175,14 @@ def main(np: Project, args):
exe_o_path = np.path.build("cxxrtl")
if platform.uses_zig:
# Zig really wants relative paths.
joined_o_paths = ",".join(
f"../{p.relative_to(np.path())}" for p in cc_o_paths.values()
)
cmd = [
"zig",
"build",
f"-Dclock_hz={int(platform.default_clk_frequency)}",
f"-Dyosys_data_dir={yosys.data_dir()}",
f"-Dcxxrtl_o_paths={joined_o_paths}",
] + [
# Zig really wants relative paths.
f"-Dcxxrtl_o_path=../{p.relative_to(np.path())}" for p in cc_o_paths.values()
]
if args.optimize.opt_app:
cmd += ["-Doptimize=ReleaseFast"]