Skip to content

Commit

Permalink
src/pykwasm/kdist/plugin.py: guarded usage of llvm flags by the backe…
Browse files Browse the repository at this point in the history
…nd being used (#34)
  • Loading branch information
traiansf authored Dec 10, 2024
1 parent 56c32e7 commit 3ac68c6
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions pykwasm/src/pykwasm/kdist/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,20 @@ def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any], v
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,
llvm_proof_hint_debugging=llvm_proof_hint_debugging,
llvm_proof_hint_instrumentation=llvm_proof_hint_instrumentation,
**kompile_args,
)
if kompile_args['backend'] == PykBackend.LLVM:
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,
)
else:
kompile(
output_dir=output_dir,
verbose=verbose,
**kompile_args,
)

def context(self) -> dict[str, str]:
return {'k-version': k_version().text}
Expand Down

0 comments on commit 3ac68c6

Please sign in to comment.