diff --git a/compiler/src/prog8/compiler/target/cpu6502/codegen/AsmGen.kt b/compiler/src/prog8/compiler/target/cpu6502/codegen/AsmGen.kt index 2a4b30b58..27ca32e1a 100644 --- a/compiler/src/prog8/compiler/target/cpu6502/codegen/AsmGen.kt +++ b/compiler/src/prog8/compiler/target/cpu6502/codegen/AsmGen.kt @@ -1327,9 +1327,11 @@ $repeatLabel lda $counterVar val sourcePath = stmt.definingModule().source // FIXME: %asmbinary inside non-library, non-filesystem module val includedPath = sourcePath.resolveSibling(includedName) - val pathForAssembler = outputDir // 64tass needs the path *relative to the .asm file* + val pathForAssembler = outputDir // #54: 64tass needs the path *relative to the .asm file* .absolute() // avoid IllegalArgumentExc due to non-absolute path .relativize(absolute path) .relativize(includedPath) + .normalize() // avoid assembler warnings (-Wportable; only some, not all) + .toString().replace('\\', '/') out(" .binary \"$pathForAssembler\" $offset $length") } "%breakpoint" -> { diff --git a/compiler/test/TestCompilerOnImportsAndIncludes.kt b/compiler/test/TestCompilerOnImportsAndIncludes.kt index e67600783..d166f92d3 100644 --- a/compiler/test/TestCompilerOnImportsAndIncludes.kt +++ b/compiler/test/TestCompilerOnImportsAndIncludes.kt @@ -117,7 +117,7 @@ class TestCompilerOnImportsAndIncludes { dynamicTest(displayName) { assumeReadableFile(p8Path) assumeReadableFile(binPath) - assertNotEquals( // the bug we're testing for (#??) was hidden if outputDir == workinDir + assertNotEquals( // the bug we're testing for (#54) was hidden if outputDir == workinDir workingDir.normalize().toAbsolutePath(), outputDir.normalize().toAbsolutePath(), "sanity check: workingDir and outputDir should not be the same folder")