Fix cross-building building engine with separate executable and library for Unix platforms on Windows
This commit is contained in:
@@ -217,7 +217,8 @@ namespace Flax.Build
|
||||
var engineLibraryType = LinkerOutput.SharedLibrary;
|
||||
if (buildOptions.Toolchain?.Compiler == TargetCompiler.MSVC)
|
||||
engineLibraryType = LinkerOutput.ImportLibrary; // MSVC links DLL against import library
|
||||
exeBuildOptions.LinkEnv.InputLibraries.Add(Path.Combine(buildOptions.OutputFolder, buildOptions.Platform.GetLinkOutputFileName(LibraryName, engineLibraryType)));
|
||||
var engineLibraryPath = Utilities.NormalizePath(Path.Combine(buildOptions.OutputFolder, buildOptions.Platform.GetLinkOutputFileName(LibraryName, engineLibraryType)));
|
||||
exeBuildOptions.LinkEnv.InputLibraries.Add(engineLibraryPath);
|
||||
exeBuildOptions.LinkEnv.InputFiles.AddRange(mainModuleOptions.OutputFiles);
|
||||
exeBuildOptions.DependencyFiles.AddRange(mainModuleOptions.DependencyFiles);
|
||||
exeBuildOptions.NugetPackageReferences.AddRange(mainModuleOptions.NugetPackageReferences);
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Flax.Build.Graph
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs tasks list sorting based on task dependencies and cost heuristics to to improve parallelism of the graph execution.
|
||||
/// Performs tasks list sorting based on task dependencies and cost heuristics to improve parallelism of the graph execution.
|
||||
/// </summary>
|
||||
public void SortTasks()
|
||||
{
|
||||
@@ -149,12 +149,7 @@ namespace Flax.Build.Graph
|
||||
{
|
||||
if (FileToProducingTaskMap.TryGetValue(prerequisiteFile, out var prerequisiteTask))
|
||||
{
|
||||
HashSet<Task> dependentTasks;
|
||||
if (taskToDependentActionsMap.ContainsKey(prerequisiteTask))
|
||||
{
|
||||
dependentTasks = taskToDependentActionsMap[prerequisiteTask];
|
||||
}
|
||||
else
|
||||
if (!taskToDependentActionsMap.TryGetValue(prerequisiteTask, out var dependentTasks))
|
||||
{
|
||||
dependentTasks = new HashSet<Task>();
|
||||
taskToDependentActionsMap[prerequisiteTask] = dependentTasks;
|
||||
|
||||
@@ -605,7 +605,8 @@ namespace Flax.Build.Platforms
|
||||
/// <inheritdoc />
|
||||
public override void LinkFiles(TaskGraph graph, BuildOptions options, string outputFilePath)
|
||||
{
|
||||
outputFilePath = outputFilePath.Replace('\\', '/');
|
||||
//outputFilePath = outputFilePath.Replace('\\', '/');
|
||||
outputFilePath = Utilities.NormalizePath(outputFilePath.Replace('\\', '/'));
|
||||
|
||||
Task linkTask;
|
||||
switch (options.LinkEnv.Output)
|
||||
|
||||
Reference in New Issue
Block a user