From e6cada5f4864cada31f84d2f2370068110d2d108 Mon Sep 17 00:00:00 2001
From: Asherah Connor <ashe@kivikakk.ee>
Date: Sun, 16 Jun 2024 17:44:58 +0300
Subject: [PATCH] cxxrtl: assume Zig build uses cxxrtl_o_path list.

---
 niar/cxxrtl.py | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/niar/cxxrtl.py b/niar/cxxrtl.py
index 2763180..7c43b22 100644
--- a/niar/cxxrtl.py
+++ b/niar/cxxrtl.py
@@ -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"]