Fix compilation of JS stdlib

1. Don't import intrinsics when compiling stdlib, use declarations
   from current module instead
2. Add constructor with one argument to SourceFilePathResolver,
   to fix bootstrapping issues.
3. Pass correct source roots to compiler when building
   stdlib, since now we pass module root by default,
   while stdlib source roots are outside of module root.
This commit is contained in:
Alexey Andreev
2017-10-09 16:00:06 +03:00
committed by Alexey Andreev
parent ea8f3dcc65
commit 8f9fc100a3
4 changed files with 38 additions and 3 deletions
+1
View File
@@ -128,6 +128,7 @@ compileKotlin2Js {
outputFile = "${buildDir}/classes/main/kotlin.js"
sourceMap = true
sourceMapPrefix = "./"
freeCompilerArgs += [ "-source-map-base-dirs", [builtinsSrcDir, jsSrcDir, commonSrcDir ].join(File.pathSeparator) ]
}
}