diff --git a/src/main/java/dk/camelot64/kickc/KickC.java b/src/main/java/dk/camelot64/kickc/KickC.java index b908c66a9..13f2b1935 100644 --- a/src/main/java/dk/camelot64/kickc/KickC.java +++ b/src/main/java/dk/camelot64/kickc/KickC.java @@ -176,6 +176,9 @@ public class KickC implements Callable { @CommandLine.Option(names = {"-var_model"}, description = "Configure variable optimization/memory area. Default is ssa_zp. See #pragma var_model") private String varModel = null; + @CommandLine.Option(names = {"-struct_model"}, description = "Configure struct model (Values: 'unwind' or 'classic'). Default is unwind. See #pragma struct_model") + private String structModel = null; + @CommandLine.Option(names = {"-calling"}, description = "Configure calling convention. Default is __phicall. See #pragma calling") private String calling = null; @@ -327,6 +330,11 @@ public class KickC implements Callable { } } + if(structModel != null) { + boolean isClassic = structModel.equalsIgnoreCase("classic"); + program.getTargetPlatform().getVariableBuilderConfig().setStructModelClassic(isClassic); + } + if(calling != null) { Procedure.CallingConvention callingConvention = Procedure.CallingConvention.getCallingConvension(calling); if(callingConvention == null) {