@@ -50,8 +50,15 @@ namespace ts {
5050
5151 Debug . assert ( commandLine . fileNames . length !== 0 || ! ! configFileName ) ;
5252
53+ const currentDirectory = sys . getCurrentDirectory ( ) ;
54+ const getCanonicalFileName = createGetCanonicalFileName ( sys . useCaseSensitiveFileNames ) ;
55+ const commandLineOptions = convertToOptionsWithAbsolutePaths (
56+ commandLine . options ,
57+ fileName => toPath ( fileName , currentDirectory , getCanonicalFileName )
58+ ) ;
59+
5360 if ( configFileName ) {
54- const configParseResult = Debug . assertDefined ( parseConfigFileWithSystem ( configFileName , commandLine . options , sys , reportDiagnostic ) ) ;
61+ const configParseResult = Debug . assertDefined ( parseConfigFileWithSystem ( configFileName , commandLineOptions , sys , reportDiagnostic ) ) ;
5562 if ( isIncrementalCompilation ( configParseResult . options ) ) {
5663 performIncrementalCompilation ( sys , configParseResult ) ;
5764 }
@@ -61,10 +68,16 @@ namespace ts {
6168 }
6269 else {
6370 if ( isIncrementalCompilation ( commandLine . options ) ) {
64- performIncrementalCompilation ( sys , commandLine ) ;
71+ performIncrementalCompilation ( sys , {
72+ ...commandLine ,
73+ options : commandLineOptions
74+ } ) ;
6575 }
6676 else {
67- performCompilation ( sys , commandLine ) ;
77+ performCompilation ( sys , {
78+ ...commandLine ,
79+ options : commandLineOptions
80+ } ) ;
6881 }
6982 }
7083 }
@@ -79,6 +92,7 @@ namespace ts {
7992 const { fileNames, options, projectReferences } = config ;
8093 const reportDiagnostic = createDiagnosticReporter ( sys , options . pretty ) ;
8194 const host = createCompilerHostWorker ( options , /*setParentPos*/ undefined , sys ) ;
95+ fakes . patchHostForBuildInfoReadWrite ( host ) ;
8296 const currentDirectory = host . getCurrentDirectory ( ) ;
8397 const getCanonicalFileName = createGetCanonicalFileName ( host . useCaseSensitiveFileNames ( ) ) ;
8498 changeCompilerHostLikeToUseCache ( host , fileName => toPath ( fileName , currentDirectory , getCanonicalFileName ) ) ;
@@ -102,7 +116,10 @@ namespace ts {
102116 function performIncrementalCompilation ( sys : TscCompileSystem , config : ParsedCommandLine ) {
103117 const reportDiagnostic = createDiagnosticReporter ( sys , config . options . pretty ) ;
104118 const { options, fileNames, projectReferences } = config ;
119+ const host = createIncrementalCompilerHost ( options , sys ) ;
120+ fakes . patchHostForBuildInfoReadWrite ( host ) ;
105121 const exitCode = ts . performIncrementalCompilation ( {
122+ host,
106123 system : sys ,
107124 rootNames : fileNames ,
108125 options,
0 commit comments