1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-18 16:10:26 +02:00

Added reference string to queued execution

This commit is contained in:
Brian Fiete 2022-03-01 12:57:22 -08:00
parent b438f2166d
commit 70adbbaa9f
2 changed files with 18 additions and 4 deletions

View file

@ -190,6 +190,10 @@ namespace IDE
else if (!isExe) else if (!isExe)
return true; return true;
String projectBuildDir = scope String();
gApp.GetProjectBuildDir(project, projectBuildDir);
File.WriteAll(scope $"{projectBuildDir}/ObjectArgs.txt", .((.)objectsArg.Ptr, objectsArg.Length)).IgnoreError();
String arCmds = scope String(""); //-O2 -Rpass=inline String arCmds = scope String(""); //-O2 -Rpass=inline
//(doClangCPP ? "-lc++abi " : "") + //(doClangCPP ? "-lc++abi " : "") +
@ -274,6 +278,7 @@ namespace IDE
cmdLine.AppendF("-M"); cmdLine.AppendF("-M");
var runCmd = gApp.QueueRun(arPath, cmdLine, workingDir, .UTF8); var runCmd = gApp.QueueRun(arPath, cmdLine, workingDir, .UTF8);
runCmd.mReference = new String(project.mProjectName);
runCmd.mOnlyIfNotFailed = true; runCmd.mOnlyIfNotFailed = true;
runCmd.mStdInData = new .(arCmds); runCmd.mStdInData = new .(arCmds);
var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project); var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project);
@ -543,6 +548,7 @@ namespace IDE
} }
var runCmd = gApp.QueueRun(compilerExePath, linkLine, workingDir, .UTF8); var runCmd = gApp.QueueRun(compilerExePath, linkLine, workingDir, .UTF8);
runCmd.mReference = new .(project.mProjectName);
runCmd.mOnlyIfNotFailed = true; runCmd.mOnlyIfNotFailed = true;
var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project); var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project);
tagetCompletedCmd.mOnlyIfNotFailed = true; tagetCompletedCmd.mOnlyIfNotFailed = true;
@ -661,6 +667,7 @@ namespace IDE
linkLine.Replace('\\', '/'); linkLine.Replace('\\', '/');
var runCmd = gApp.QueueRun(compilerExePath, linkLine, project.mProjectDir, .UTF8); var runCmd = gApp.QueueRun(compilerExePath, linkLine, project.mProjectDir, .UTF8);
runCmd.mReference = new .(project.mProjectName);
runCmd.mOnlyIfNotFailed = true; runCmd.mOnlyIfNotFailed = true;
var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project); var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project);
tagetCompletedCmd.mOnlyIfNotFailed = true; tagetCompletedCmd.mOnlyIfNotFailed = true;
@ -1195,6 +1202,7 @@ namespace IDE
} }
var runCmd = gApp.QueueRun(linkerPath, linkLine, gApp.mInstallDir, .UTF16WithBom); var runCmd = gApp.QueueRun(linkerPath, linkLine, gApp.mInstallDir, .UTF16WithBom);
runCmd.mReference = new .(project.mProjectName);
runCmd.mEnvVars = new .() { (new String("VSLANG"), new String("1033")) }; runCmd.mEnvVars = new .() { (new String("VSLANG"), new String("1033")) };
runCmd.mOnlyIfNotFailed = true; runCmd.mOnlyIfNotFailed = true;
var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project); var tagetCompletedCmd = new IDEApp.TargetCompletedCmd(project);

View file

@ -453,6 +453,7 @@ namespace IDE
public class ExecutionQueueCmd : ExecutionCmd public class ExecutionQueueCmd : ExecutionCmd
{ {
public String mReference ~ delete _;
public String mFileName ~ delete _; public String mFileName ~ delete _;
public String mArgs ~ delete _; public String mArgs ~ delete _;
public String mWorkingDir ~ delete _; public String mWorkingDir ~ delete _;
@ -8212,7 +8213,7 @@ namespace IDE
NoWait = 8, NoWait = 8,
} }
public ExecutionInstance DoRun(String inFileName, String args, String workingDir, ArgsFileKind useArgsFile, Dictionary<String, String> envVars = null, String stdInData = null, RunFlags runFlags = .None) public ExecutionInstance DoRun(String inFileName, String args, String workingDir, ArgsFileKind useArgsFile, Dictionary<String, String> envVars = null, String stdInData = null, RunFlags runFlags = .None, String reference = null)
{ {
//Debug.Assert(executionInstance == null); //Debug.Assert(executionInstance == null);
@ -8310,7 +8311,11 @@ namespace IDE
if (!startInfo.[Friend]mFileName.IsEmpty) if (!startInfo.[Friend]mFileName.IsEmpty)
{ {
OutputLine("Executing: {0} {1}", startInfo.[Friend]mFileName, showArgs); if (reference != null)
OutputLine($"Executing ({reference}): {startInfo.[Friend]mFileName} {showArgs}");
else
OutputLine($"Executing: {startInfo.[Friend]mFileName} {showArgs}");
if ((mVerbosity >= .Diagnostic) && (useArgsFile != .None)) if ((mVerbosity >= .Diagnostic) && (useArgsFile != .None))
OutputLine("Arg file contents: {0}", args); OutputLine("Arg file contents: {0}", args);
} }
@ -8667,7 +8672,8 @@ namespace IDE
ReplaceVariables(kv.value); ReplaceVariables(kv.value);
} }
var executionInstance = DoRun(executionQueueCmd.mFileName, executionQueueCmd.mArgs, executionQueueCmd.mWorkingDir, executionQueueCmd.mUseArgsFile, executionQueueCmd.mEnvVars, executionQueueCmd.mStdInData, executionQueueCmd.mRunFlags); var executionInstance = DoRun(executionQueueCmd.mFileName, executionQueueCmd.mArgs, executionQueueCmd.mWorkingDir, executionQueueCmd.mUseArgsFile,
executionQueueCmd.mEnvVars, executionQueueCmd.mStdInData, executionQueueCmd.mRunFlags, executionQueueCmd.mReference);
if (executionInstance != null) if (executionInstance != null)
{ {
executionInstance.mParallelGroup = executionQueueCmd.mParallelGroup; executionInstance.mParallelGroup = executionQueueCmd.mParallelGroup;