From 951dd5f3e19ff365d86f67edef6b746429ab816d Mon Sep 17 00:00:00 2001 From: Alex Oltean Date: Wed, 31 Jul 2024 12:15:00 +0300 Subject: [PATCH] Pass proof hints flags to kompile (#8) This PR exposes the Pyk-Kompile proof hint flags to Poetry. --- pykwasm/src/pykwasm/kdist/plugin.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pykwasm/src/pykwasm/kdist/plugin.py b/pykwasm/src/pykwasm/kdist/plugin.py index 97d1f9554..62d96f1fd 100644 --- a/pykwasm/src/pykwasm/kdist/plugin.py +++ b/pykwasm/src/pykwasm/kdist/plugin.py @@ -30,8 +30,16 @@ def __init__(self, kompile_args: Callable[[Path], Mapping[str, Any]]): self._kompile_args = kompile_args def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any], verbose: bool) -> None: + llvm_proof_hint_debugging = bool(args.get('llvm-proof-hint-debugging', '')) + llvm_proof_hint_instrumentation = bool(args.get('llvm-proof-hint-instrumentation', '')) kompile_args = self._kompile_args(deps['wasm-semantics.source']) - kompile(output_dir=output_dir, verbose=verbose, **kompile_args) + kompile( + output_dir=output_dir, + verbose=verbose, + llvm_proof_hint_debugging=llvm_proof_hint_debugging, + llvm_proof_hint_instrumentation=llvm_proof_hint_instrumentation, + **kompile_args, + ) def context(self) -> dict[str, str]: return {'k-version': k_version().text}