@@ -36,6 +36,8 @@ internal class Program
3636private Dictionary < string , string > _allInputFilePaths = new Dictionary < string , string > ( ) ;
3737private List < ModuleDesc > _referenceableModules = new List < ModuleDesc > ( ) ;
3838
39+ private Dictionary < string , string > _inputbubblereferenceFilePaths = new Dictionary < string , string > ( StringComparer . OrdinalIgnoreCase ) ;
40+
3941private CompilerTypeSystemContext _typeSystemContext ;
4042private ReadyToRunMethodLayoutAlgorithm _methodLayout ;
4143private ReadyToRunFileLayoutAlgorithm _fileLayout ;
@@ -128,6 +130,9 @@ private void ProcessCommandLine(string[] args)
128130foreach ( var reference in _commandLineOptions . ReferenceFilePaths )
129131Helpers . AppendExpandedPaths ( _referenceFilePaths , reference , false ) ;
130132
133+ foreach ( var reference in _commandLineOptions . InputBubbleReferenceFilePaths )
134+ Helpers . AppendExpandedPaths ( _inputbubblereferenceFilePaths , reference , false ) ;
135+
131136
132137int alignment = _commandLineOptions . CustomPESectionAlignment ;
133138if ( alignment != 0 )
@@ -438,14 +443,28 @@ private int Run(string[] args)
438443{
439444EcmaModule module = _typeSystemContext . GetModuleFromPath ( referenceFile ) ;
440445_referenceableModules . Add ( module ) ;
441- if ( _commandLineOptions . InputBubble )
446+ if ( _commandLineOptions . InputBubble && _inputbubblereferenceFilePaths . Count == 0 )
442447{
443448// In large version bubble mode add reference paths to the compilation group
449+ // Consider bubble as large if no explicit bubble references were passed
444450versionBubbleModulesHash . Add ( module ) ;
445451}
446452}
447453catch { } // Ignore non-managed pe files
448454}
455+
456+ if ( _commandLineOptions . InputBubble )
457+ {
458+ foreach ( var referenceFile in _inputbubblereferenceFilePaths . Values )
459+ {
460+ try
461+ {
462+ EcmaModule module = _typeSystemContext . GetModuleFromPath ( referenceFile ) ;
463+ versionBubbleModulesHash . Add ( module ) ;
464+ }
465+ catch { } // Ignore non-managed pe files
466+ }
467+ }
449468}
450469
451470string systemModuleName = _commandLineOptions . SystemModule ?? DefaultSystemModule ;