Add CustomArgs to compile and link environment in build tool for customization
This commit is contained in:
@@ -157,6 +157,11 @@ namespace Flax.Build.NativeCpp
|
||||
/// </summary>
|
||||
public readonly List<string> IncludePaths = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// The collection of custom arguments to pass to the compilator.
|
||||
/// </summary>
|
||||
public readonly HashSet<string> CustomArgs = new HashSet<string>();
|
||||
|
||||
/// <inheritdoc />
|
||||
public object Clone()
|
||||
{
|
||||
@@ -183,6 +188,7 @@ namespace Flax.Build.NativeCpp
|
||||
};
|
||||
clone.PreprocessorDefinitions.AddRange(PreprocessorDefinitions);
|
||||
clone.IncludePaths.AddRange(IncludePaths);
|
||||
clone.CustomArgs.AddRange(CustomArgs);
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +106,11 @@ namespace Flax.Build.NativeCpp
|
||||
/// </summary>
|
||||
public readonly List<string> LibraryPaths = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// The collection of custom arguments to pass to the linker.
|
||||
/// </summary>
|
||||
public readonly HashSet<string> CustomArgs = new HashSet<string>();
|
||||
|
||||
/// <inheritdoc />
|
||||
public object Clone()
|
||||
{
|
||||
@@ -127,6 +132,7 @@ namespace Flax.Build.NativeCpp
|
||||
clone.DocumentationFiles.AddRange(DocumentationFiles);
|
||||
clone.InputLibraries.AddRange(InputLibraries);
|
||||
clone.LibraryPaths.AddRange(LibraryPaths);
|
||||
clone.CustomArgs.AddRange(CustomArgs);
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace Flax.Build.Platforms
|
||||
|
||||
// Setup arguments shared by all source files
|
||||
var commonArgs = new List<string>();
|
||||
commonArgs.AddRange(options.CompileEnv.CustomArgs);
|
||||
{
|
||||
commonArgs.Add("-c");
|
||||
commonArgs.Add("-fmessage-length=0");
|
||||
@@ -252,6 +253,7 @@ namespace Flax.Build.Platforms
|
||||
|
||||
// Setup arguments
|
||||
var args = new List<string>();
|
||||
args.AddRange(options.LinkEnv.CustomArgs);
|
||||
{
|
||||
args.Add(string.Format("-o \"{0}\"", outputFilePath));
|
||||
AddArgsCommon(options, args);
|
||||
|
||||
@@ -315,6 +315,7 @@ namespace Flax.Build.Platforms
|
||||
|
||||
// Setup arguments shared by all source files
|
||||
var commonArgs = new List<string>();
|
||||
commonArgs.AddRange(options.CompileEnv.CustomArgs);
|
||||
SetupCompileCppFilesArgs(graph, options, commonArgs, outputPath);
|
||||
{
|
||||
commonArgs.Add("-c");
|
||||
@@ -501,6 +502,7 @@ namespace Flax.Build.Platforms
|
||||
|
||||
// Setup arguments
|
||||
var args = new List<string>();
|
||||
args.AddRange(options.LinkEnv.CustomArgs);
|
||||
{
|
||||
args.Add(string.Format("-o \"{0}\"", outputFilePath));
|
||||
|
||||
|
||||
@@ -428,6 +428,7 @@ namespace Flax.Build.Platforms
|
||||
|
||||
// Setup arguments shared by all source files
|
||||
var commonArgs = new List<string>();
|
||||
commonArgs.AddRange(options.CompileEnv.CustomArgs);
|
||||
SetupCompileCppFilesArgs(graph, options, commonArgs);
|
||||
{
|
||||
// Suppress Startup Banner
|
||||
@@ -669,6 +670,7 @@ namespace Flax.Build.Platforms
|
||||
|
||||
// Setup arguments
|
||||
var args = new List<string>();
|
||||
args.AddRange(options.LinkEnv.CustomArgs);
|
||||
SetupLinkFilesArgs(graph, options, args);
|
||||
{
|
||||
// Suppress startup banner
|
||||
|
||||
Reference in New Issue
Block a user