Skip to content

fix: Check for wasm-opt during configure & run on post_build#175

Merged
dbanks12 merged 1 commit into
masterfrom
phated/cleanup-wasmopt
Feb 24, 2023
Merged

fix: Check for wasm-opt during configure & run on post_build#175
dbanks12 merged 1 commit into
masterfrom
phated/cleanup-wasmopt

Conversation

@phated

@phated phated commented Feb 22, 2023

Copy link
Copy Markdown

Description

This PR makes the wasm-opt dependency more explicit. It is now referenced as a dependency since the wasm build fails without it. I've also added a find_program call to ensure it is installed during the configure phase for a wasm build; otherwise you'd get to the very end and it would crash.

I've changed the executable target to be barretenberg.wasm and then used the TARGET variant of add_custom_command so the wasm-opt command isn't run if barretenberg.wasm is already built. The previous way of doing this created a target that was always stale.

This should enable adding the wasm binary as an installation target, which is not possible with custom targets.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • There are no circuit changes, OR specifications in /markdown/specs have been updated.
  • There are no circuit changes, OR a cryptographer has been assigned for review.
  • I've updated any terraform that needs updating (e.g. environment variables) for deployment.
  • The branch has been rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.
  • New functions, classes, etc. have been documented according to the doxygen comment format. Classes and structs must have @brief describing the intended functionality.
  • If existing code has been modified, such documentation has been added or updated.

Comment thread cpp/src/aztec/CMakeLists.txt
@dbanks12

Copy link
Copy Markdown

Left a comment. Otherwise looks good to me. This is good cleanup.

@dbanks12 dbanks12 merged commit 1ff6af3 into master Feb 24, 2023
@dbanks12 dbanks12 deleted the phated/cleanup-wasmopt branch February 24, 2023 15:03
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 22, 2023
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants