Skip to content

Commit efb2ba2

Browse files
committed
fix: use "\\" in verification layer output directory instead of "\" on Windows platform.
1 parent d1118b1 commit efb2ba2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/main/scala/chisel3/internal/Builder.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,14 @@ private[chisel3] object Builder extends LazyLogging {
10851085
*/
10861086
def foldLayers(l: layer.Layer): Layer = {
10871087
val children = layerAdjacencyList(l)
1088+
def path2str(path: java.nio.file.Path): String = {
1089+
System.getProperty("os.name").toLowerCase match {
1090+
case os if os.contains("windows") => path.toString.replace("\\", "\\\\")
1091+
case _ => path.toString
1092+
}
1093+
}
10881094
val config = l.config match {
1089-
case layer.LayerConfig.Extract(_) => LayerConfig.Extract(l.outputDir.map(_.toString))
1095+
case layer.LayerConfig.Extract(_) => LayerConfig.Extract(l.outputDir.map(path2str))
10901096
case layer.LayerConfig.Inline => LayerConfig.Inline
10911097
case layer.LayerConfig.Root => ???
10921098
}

0 commit comments

Comments
 (0)