Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd71182a

Browse files
authored
Add --inputbubbleref option to crossgen2 in order to put only part of references into version bubble (#51555)
1 parente01ffb9 commitd71182a

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

‎src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ internal class CommandLineOptions
1616
publicstringHelpText;
1717

1818
publicIReadOnlyList<string>InputFilePaths;
19+
publicIReadOnlyList<string>InputBubbleReferenceFilePaths;
1920
publicIReadOnlyList<string>UnrootedInputFilePaths;
2021
publicIReadOnlyList<string>ReferenceFilePaths;
2122
publicIReadOnlyList<string>MibcFilePaths;
@@ -74,6 +75,7 @@ internal class CommandLineOptions
7475
publicCommandLineOptions(string[]args)
7576
{
7677
InputFilePaths=Array.Empty<string>();
78+
InputBubbleReferenceFilePaths=Array.Empty<string>();
7779
UnrootedInputFilePaths=Array.Empty<string>();
7880
ReferenceFilePaths=Array.Empty<string>();
7981
MibcFilePaths=Array.Empty<string>();
@@ -101,6 +103,7 @@ public CommandLineOptions(string[] args)
101103
syntax.DefineOption("Os|optimize-space",refOptimizeSpace,SR.OptimizeSpaceOption);
102104
syntax.DefineOption("Ot|optimize-time",refOptimizeTime,SR.OptimizeSpeedOption);
103105
syntax.DefineOption("inputbubble",refInputBubble,SR.InputBubbleOption);
106+
syntax.DefineOptionList("inputbubbleref",refInputBubbleReferenceFilePaths,SR.InputBubbleReferenceFiles);
104107
syntax.DefineOption("composite",refComposite,SR.CompositeBuildMode);
105108
syntax.DefineOption("compositekeyfile",refCompositeKeyFile,SR.CompositeKeyFile);
106109
syntax.DefineOption("compile-no-methods",refCompileNoMethods,SR.CompileNoMethodsOption);

‎src/coreclr/tools/aot/crossgen2/Program.cs‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ internal class Program
3636
privateDictionary<string,string>_allInputFilePaths=newDictionary<string,string>();
3737
privateList<ModuleDesc>_referenceableModules=newList<ModuleDesc>();
3838

39+
privateDictionary<string,string>_inputbubblereferenceFilePaths=newDictionary<string,string>(StringComparer.OrdinalIgnoreCase);
40+
3941
privateCompilerTypeSystemContext_typeSystemContext;
4042
privateReadyToRunMethodLayoutAlgorithm_methodLayout;
4143
privateReadyToRunFileLayoutAlgorithm_fileLayout;
@@ -128,6 +130,9 @@ private void ProcessCommandLine(string[] args)
128130
foreach(varreferencein_commandLineOptions.ReferenceFilePaths)
129131
Helpers.AppendExpandedPaths(_referenceFilePaths,reference,false);
130132

133+
foreach(varreferencein_commandLineOptions.InputBubbleReferenceFilePaths)
134+
Helpers.AppendExpandedPaths(_inputbubblereferenceFilePaths,reference,false);
135+
131136

132137
intalignment=_commandLineOptions.CustomPESectionAlignment;
133138
if(alignment!=0)
@@ -438,14 +443,28 @@ private int Run(string[] args)
438443
{
439444
EcmaModulemodule=_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
444450
versionBubbleModulesHash.Add(module);
445451
}
446452
}
447453
catch{}// Ignore non-managed pe files
448454
}
455+
456+
if(_commandLineOptions.InputBubble)
457+
{
458+
foreach(varreferenceFilein_inputbubblereferenceFilePaths.Values)
459+
{
460+
try
461+
{
462+
EcmaModulemodule=_typeSystemContext.GetModuleFromPath(referenceFile);
463+
versionBubbleModulesHash.Add(module);
464+
}
465+
catch{}// Ignore non-managed pe files
466+
}
467+
}
449468
}
450469

451470
stringsystemModuleName=_commandLineOptions.SystemModule??DefaultSystemModule;

‎src/coreclr/tools/aot/crossgen2/Properties/Resources.resx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@
225225
<dataname="ReferenceFiles"xml:space="preserve">
226226
<value>Reference file(s) for compilation</value>
227227
</data>
228+
<dataname="InputBubbleReferenceFiles"xml:space="preserve">
229+
<value>Input bubble reference file(s) to be added to bubble (any use of this option is unsupported!) </value>
230+
</data>
228231
<dataname="ResilientOption"xml:space="preserve">
229232
<value>Disable behavior where unexpected compilation failures cause overall compilation failure</value>
230233
</data>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp