Skip to content

Conversation

jgonet
Copy link
Collaborator

@jgonet jgonet commented Sep 22, 2025

Instead of building using command line and cmake/make/emcmake/emmake, streamline to use single script.

➜  AtomVM git:(swm) ✗ ./build-fission.sh
Usage: ./build-fission.sh [--clean] <build_mode>
Options:
  --clean       - Clean project before building
Build modes:
  debug-unix    - Debug build for Unix platforms
  debug-wasm    - Debug build for WebAssembly
  release-unix  - Release build for Unix platforms
  release-wasm  - Release build for WebAssembly

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Signed-off-by: Jakub Gonet <jakub.gonet@swmansion.com>
Copy link
Member

@mat-hek mat-hek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the following error trying to run the script: ninja: error: loading 'build.ninja': No such file or directory

@bblaszkow06
Copy link
Member

I get the following error trying to run the script: ninja: error: loading 'build.ninja': No such file or directory

You must delete build and src/platforms/emscripten/build to regenerate cmake with new env var and generate build.ninja

BTW I would suggest

  1. Separating directories for each output type to know which version is currently in out
  2. Use separate build dirs to not regenerate cmake from scratch when changing the build. If both of them would be different then build, it could be left out for manual compilation (e.g. when experimenting with cmake flags) and would prevent the error that @mat-hek saw

@mat-hek
Copy link
Member

mat-hek commented Oct 1, 2025

BTW the script could support passing CMake flags

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.

3 participants