File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 11package dotty .tools
22package dotc
33
4- import dotty .tools .dotc .core .Types .Type
5- import dotty .tools .dotc .core .tasty .{TastyUnpickler , TastyBuffer , TastyPickler }
6- import util .SourceFile
4+ import util ._
75import ast .{tpd , untpd }
86import dotty .tools .dotc .ast .tpd .{ Tree , TreeTraverser }
97import dotty .tools .dotc .core .Contexts .Context
@@ -28,7 +26,7 @@ object CompilationUnit {
2826
2927 /** Make a compilation unit for top class `clsd` with the contends of the `unpickled` */
3028 def mkCompilationUnit (clsd : ClassDenotation , unpickled : Tree , forceTrees : Boolean )(implicit ctx : Context ): CompilationUnit = {
31- val unit1 = new CompilationUnit (new SourceFile (clsd.symbol.sourceFile , Seq ()))
29+ val unit1 = new CompilationUnit (new SourceFile (clsd.symbol.associatedFile , Seq ()))
3230 unit1.tpdTree = unpickled
3331 if (forceTrees)
3432 force.traverse(unit1.tpdTree)
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ dotc -tasty -Xlink-optimise $@
Original file line number Diff line number Diff line change @@ -522,9 +522,11 @@ object Build {
522522 case (beforeCp, rest) => beforeCp ++ rest
523523 }
524524
525- (runMain in Compile ).toTask(
526- s " dotty.tools.dotc.Main " + fullArgs.mkString(" " )
527- )
525+ val main =
526+ if (fullArgs.contains(" -Xlink-optimise" )) " dotty.tools.dotc.FromTasty"
527+ else " dotty.tools.dotc.Main"
528+
529+ (runMain in Compile ).toTask((main +: fullArgs).mkString(" " , " " , " " ))
528530 }.evaluated,
529531 dotc := run.evaluated,
530532
You can’t perform that action at this time.
0 commit comments