diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-03-24 15:04:11 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-03-24 15:04:11 +0000 |
| commit | ba1d43354da18aa473200fefde8316e8017841a7 (patch) | |
| tree | ba43d81dc60463059faf91bda3471550de3d288a /src/main/java/org/shedlang/compiler/runtime | |
| parent | 85f9578fb680ab4ee959469133714acd908a7c10 (diff) | |
Handle options in GC config for custom runtimes
Diffstat (limited to 'src/main/java/org/shedlang/compiler/runtime')
| -rw-r--r-- | src/main/java/org/shedlang/compiler/runtime/ShedRuntime.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/org/shedlang/compiler/runtime/ShedRuntime.java b/src/main/java/org/shedlang/compiler/runtime/ShedRuntime.java index 25a81345..7c9dbddd 100644 --- a/src/main/java/org/shedlang/compiler/runtime/ShedRuntime.java +++ b/src/main/java/org/shedlang/compiler/runtime/ShedRuntime.java @@ -7,6 +7,7 @@ import org.shedlang.compiler.filesystem.ShedCompilerFiles; import org.shedlang.compiler.util.processes.ProcessError; import java.nio.file.Path; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; @@ -46,16 +47,20 @@ public class ShedRuntime { } // TODO: deal with stale compiled runtimes (in build.py?) - // TODO: handle GC config var runtimeDir = targetDir.topLevel("runtime"); - var buildRuntimeCommand = List.of( + var buildRuntimeCommand = new ArrayList<>(List.of( "python3", ShedCompilerFiles.getRoot().resolve("runtime/build.py").toString(), "custom", "--target", targetName, "--gc", gc.name(), "--output-dir", runtimeDir.toString() - ); + )); + + for (var option : gc.runtimeBuildOptions()) { + buildRuntimeCommand.add("-D" + option); + } + runInheritIo(buildRuntimeCommand); return new ShedRuntime(runtimeDir); |
