Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Jun 4, 2024
1 parent 2cce68a commit 46902fb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions chibild/chibild.core/CilLinker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private bool TryLoadInputReferences(
string[] libraryReferenceBasePaths,
string[] assemblyReferenceBasePaths,
InputReference[] inputReferences,
string? injectToAssemblyPath,
bool isLocationOriginSource,
out InputFragment[] fragments)
{
Expand Down Expand Up @@ -144,6 +145,7 @@ when Path.GetExtension(relativePath) == ".a":
// Asssembly:
case LibraryPathReference(var relativePath):
var isInjectAssembly = (index == 0) && (relativePath == injectToAssemblyPath);
var libraryFilePath = Path.Combine(baseInputPath, relativePath);
if (!File.Exists(libraryFilePath))
{
Expand All @@ -157,11 +159,8 @@ when Path.GetExtension(relativePath) == ".a":
this.logger,
baseInputPath,
relativePath,
// Create this assembly specific resolver,
// because shared resolver can not resolve on multi-threaded context.
// At the cost of having to load it again later in the primary assembly resolver.
this.CreateAssemblyResolver(
ReadingMode.Immediate,
ReadingMode.Deferred,
assemblyReferenceBasePaths)),
};
break;
Expand Down Expand Up @@ -194,11 +193,8 @@ when Path.GetExtension(relativePath) == ".a":
this.logger,
foundEntry.basePath,
foundEntry.fileName,
// Create this assembly specific resolver,
// because shared resolver can not resolve on multi-threaded context.
// At the cost of having to load it again later in the primary assembly resolver.
this.CreateAssemblyResolver(
ReadingMode.Immediate,
ReadingMode.Deferred,
assemblyReferenceBasePaths)),
};
}
Expand Down Expand Up @@ -326,6 +322,7 @@ injectToAssemblyPath is { } injectPath ?
options.LibraryReferenceBasePaths,
assemblyReferenceBasePaths,
totalInputReferences,
injectToAssemblyPath,
produceDebuggingInformation,
out var loadedFragments))
{
Expand Down

0 comments on commit 46902fb

Please sign in to comment.