diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-03-09 21:52:45 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-03-09 21:52:45 +0000 |
| commit | 564a2a7f4feb6f53b5aeff38a73f30dc275d4437 (patch) | |
| tree | 8315e706744b44869f974444254e4a7b0558f767 /src/main/java/org/shedlang/compiler/ShedCompiler.java | |
| parent | 596b1c1fde6b94326c7cc1ee35c81586fa04ab72 (diff) | |
Remove duplication of path to binary
Diffstat (limited to 'src/main/java/org/shedlang/compiler/ShedCompiler.java')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/ShedCompiler.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/shedlang/compiler/ShedCompiler.java b/src/main/java/org/shedlang/compiler/ShedCompiler.java index e2be53a2..845da159 100644 --- a/src/main/java/org/shedlang/compiler/ShedCompiler.java +++ b/src/main/java/org/shedlang/compiler/ShedCompiler.java @@ -30,7 +30,7 @@ import static org.shedlang.compiler.sourcefiles.SourceFiles.collectSourceFiles; import static org.shedlang.compiler.typechecker.NamespaceDependencyLineariser.orderNamespaces; public class ShedCompiler { - public void compile( + public TargetDir compile( Path projectRoot, Backend backend, Optional<String> profileName @@ -85,17 +85,17 @@ public class ShedCompiler { var profileConfig = profileName.map(config::profile) .orElse(ProfileConfig.DEFAULT); + var targetDir = config.targetDir(backend, profileConfig); + backend.compile( config, profileConfig, namespaces, typeInfos, - new TargetDir( - config.targetDir() - .resolve(backend.targetName()) - .resolve(profileConfig.name()) - ) + targetDir ); + + return targetDir; } /** |
