Verified Commit 7678faca authored by Camil Staps's avatar Camil Staps 🐨

Add new settings to set command of cpm CLI

parent a956a116
Pipeline #23190 passed with stage
in 3 minutes and 7 seconds
......@@ -59,6 +59,12 @@ from StdMaybe import :: Maybe
| Output !Output
| LinkerGenerateSymbolsOn
| LinkerGenerateSymbolsOff
| ByteCodePath !FilePath
| PO_OptimiseABC !Bool
| PO_GenerateByteCode !Bool
| PO_StripByteCode !Bool
| PO_KeepByteCodeSymbols !Bool
| PO_PreLinkByteCode !Bool
:: ModuleAction
= CreateModule ModuleType
......
......@@ -200,6 +200,18 @@ where
= PR_SetLinkOptions project {PR_GetLinkOptions project & generate_symbol_table=True}
set_project_option LinkerGenerateSymbolsOff project
= PR_SetLinkOptions project {PR_GetLinkOptions project & generate_symbol_table=False}
set_project_option (ByteCodePath path) project
= PR_SetByteCodePath path project
set_project_option (PO_OptimiseABC val) project
= PR_SetCodeGenOptions {PR_GetCodeGenOptions project & optimise_abc=val} project
set_project_option (PO_GenerateByteCode val) project
= PR_SetCodeGenOptions {PR_GetCodeGenOptions project & generate_bytecode=val} project
set_project_option (PO_StripByteCode val) project
= PR_SetLinkOptions project {PR_GetLinkOptions project & strip_bytecode=val}
set_project_option (PO_KeepByteCodeSymbols val) project
= PR_SetLinkOptions project {PR_GetLinkOptions project & keep_bytecode_symbols=val}
set_project_option (PO_PreLinkByteCode val) project
= PR_SetLinkOptions project {PR_GetLinkOptions project & prelink_bytecode=val}
doProjectAction _ _ _ _ world =
help "cpm project <projectfile> <action>"
......
......@@ -149,6 +149,39 @@ parse_Project_options ["-mp":project_option_args]
parse_Project_options ["-nmp":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [MemoryProfileOff:project_options]);
parse_Project_options ["-bytecode":path:project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [ByteCodePath path:project_options]);
parse_Project_options ["-optimiseabc":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_OptimiseABC True:project_options]);
parse_Project_options ["-noptimiseabc":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_OptimiseABC False:project_options]);
parse_Project_options ["-genbytecode":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_GenerateByteCode True:project_options]);
parse_Project_options ["-ngenbytecode":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_GenerateByteCode False:project_options]);
parse_Project_options ["-stripbytecode":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_StripByteCode True:project_options]);
parse_Project_options ["-nstripbytecode":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_StripByteCode False:project_options]);
parse_Project_options ["-keepbytecodesymbols":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_KeepByteCodeSymbols True:project_options]);
parse_Project_options ["-nkeepbytecodesymbols":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_KeepByteCodeSymbols False:project_options]);
parse_Project_options ["-prelinkbytecode":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_PreLinkByteCode True:project_options]);
parse_Project_options ["-nprelinkbytecode":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [PO_PreLinkByteCode False:project_options]);
parse_Project_options []
= (True,[]);
parse_Project_options _
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment