Skip to content

Commit

Permalink
Correct output paths with multiple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-goel committed Sep 27, 2023
1 parent 492b812 commit 7a98e3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/PCompiler/CompilerCore/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ public int Compile(ICompilerConfiguration job)
IRTransformer.SimplifyMethod(fun);
}

DirectoryInfo parentDirectory = job.OutputDirectory;
foreach (var entry in job.OutputLanguages)
{
job.OutputDirectory = Directory.CreateDirectory(Path.Combine(job.OutputDirectory.FullName, entry.Key));
job.OutputDirectory = Directory.CreateDirectory(Path.Combine(parentDirectory.FullName, entry.Key));
job.Output = new DefaultCompilerOutput(job.OutputDirectory);
job.Backend = TargetLanguage.GetCodeGenerator(entry.Value);

Expand Down

0 comments on commit 7a98e3b

Please sign in to comment.