public string HelpText;
public IReadOnlyList<string> InputFilePaths;
+ public IReadOnlyList<string> InputBubbleReferenceFilePaths;
public IReadOnlyList<string> UnrootedInputFilePaths;
public IReadOnlyList<string> ReferenceFilePaths;
public IReadOnlyList<string> MibcFilePaths;
public CommandLineOptions(string[] args)
{
InputFilePaths = Array.Empty<string>();
+ InputBubbleReferenceFilePaths = Array.Empty<string>();
UnrootedInputFilePaths = Array.Empty<string>();
ReferenceFilePaths = Array.Empty<string>();
MibcFilePaths = Array.Empty<string>();
syntax.DefineOption("Os|optimize-space", ref OptimizeSpace, SR.OptimizeSpaceOption);
syntax.DefineOption("Ot|optimize-time", ref OptimizeTime, SR.OptimizeSpeedOption);
syntax.DefineOption("inputbubble", ref InputBubble, SR.InputBubbleOption);
+ syntax.DefineOptionList("inputbubbleref", ref InputBubbleReferenceFilePaths, SR.InputBubbleReferenceFiles);
syntax.DefineOption("composite", ref Composite, SR.CompositeBuildMode);
syntax.DefineOption("compositekeyfile", ref CompositeKeyFile, SR.CompositeKeyFile);
syntax.DefineOption("compile-no-methods", ref CompileNoMethods, SR.CompileNoMethodsOption);
private Dictionary<string, string> _allInputFilePaths = new Dictionary<string, string>();
private List<ModuleDesc> _referenceableModules = new List<ModuleDesc>();
+ private Dictionary<string, string> _inputbubblereferenceFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+
private CompilerTypeSystemContext _typeSystemContext;
private ReadyToRunMethodLayoutAlgorithm _methodLayout;
private ReadyToRunFileLayoutAlgorithm _fileLayout;
foreach (var reference in _commandLineOptions.ReferenceFilePaths)
Helpers.AppendExpandedPaths(_referenceFilePaths, reference, false);
+ foreach (var reference in _commandLineOptions.InputBubbleReferenceFilePaths)
+ Helpers.AppendExpandedPaths(_inputbubblereferenceFilePaths, reference, false);
+
int alignment = _commandLineOptions.CustomPESectionAlignment;
if (alignment != 0)
{
EcmaModule module = _typeSystemContext.GetModuleFromPath(referenceFile);
_referenceableModules.Add(module);
- if (_commandLineOptions.InputBubble)
+ if (_commandLineOptions.InputBubble && _inputbubblereferenceFilePaths.Count == 0)
{
// In large version bubble mode add reference paths to the compilation group
+ // Consider bubble as large if no explicit bubble references were passed
versionBubbleModulesHash.Add(module);
}
}
catch { } // Ignore non-managed pe files
}
+
+ if (_commandLineOptions.InputBubble)
+ {
+ foreach (var referenceFile in _inputbubblereferenceFilePaths.Values)
+ {
+ try
+ {
+ EcmaModule module = _typeSystemContext.GetModuleFromPath(referenceFile);
+ versionBubbleModulesHash.Add(module);
+ }
+ catch { } // Ignore non-managed pe files
+ }
+ }
}
string systemModuleName = _commandLineOptions.SystemModule ?? DefaultSystemModule;
<data name="ReferenceFiles" xml:space="preserve">
<value>Reference file(s) for compilation</value>
</data>
+ <data name="InputBubbleReferenceFiles" xml:space="preserve">
+ <value>Input bubble reference file(s) to be added to bubble (any use of this option is unsupported!) </value>
+ </data>
<data name="ResilientOption" xml:space="preserve">
<value>Disable behavior where unexpected compilation failures cause overall compilation failure</value>
</data>