Use log_warning when Tcl_Init fails, report error with Tcl_ErrnoMsg.
authorAlastair M. Robinson <robinsonb5@gmail.com>
Mon, 16 May 2022 19:22:28 +0000 (20:22 +0100)
committerAlastair M. Robinson <robinsonb5@gmail.com>
Mon, 16 May 2022 19:22:28 +0000 (20:22 +0100)
kernel/yosys.cc

index 6ab28314836c4433ee237609c20507e61a16fb35..4e1a3ca7e2d883175e8d778629f297352c2d7d63 100644 (file)
@@ -734,7 +734,7 @@ extern Tcl_Interp *yosys_get_tcl_interp()
        if (yosys_tcl_interp == NULL) {
                yosys_tcl_interp = Tcl_CreateInterp();
                if (Tcl_Init(yosys_tcl_interp)!=TCL_OK)
-                       log("Tcl_Init() call failed\n");
+                       log_warning("Tcl_Init() call failed - %s\n",Tcl_ErrnoMsg(Tcl_GetErrno()));
                Tcl_CreateCommand(yosys_tcl_interp, "yosys", tcl_yosys_cmd, NULL, NULL);
        }
        return yosys_tcl_interp;