We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96cc1b7 commit c612a79Copy full SHA for c612a79
core/src/main/scala/chisel3/internal/SourceInfoFileResolver.scala
@@ -16,10 +16,11 @@ private[internal] object SourceInfoFileResolver {
16
def resolve(source: scala.reflect.internal.util.SourceFile): String = {
17
val userDir = sys.props.get("user.dir") // Figure out what to do if not provided
18
val projectRoot = sys.props.get("chisel.project.root")
19
+ val isAbs = sys.props.get("chisel.project.root.absolute").isDefined
20
val root = projectRoot.orElse(userDir)
21
22
val path = root.map(r => source.file.canonicalPath.stripPrefix(r)).getOrElse(source.file.name)
23
val pathNoStartingSlash = if (path(0) == '/') path.tail else path
- pathNoStartingSlash
24
+ if(isAbs) pathNoStartingSlash else source.file.path
25
}
26
0 commit comments