Skip to content

Commit

Permalink
fixed: *-none builds
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanfh committed Dec 8, 2024
1 parent 0184d32 commit 31efe6d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ FLAGS=""
if [ ! -z ${ONYX_TARGET+x} ]; then
FLAGS="$FLAGS --target=$ONYX_TARGET"
fi
$ONYX_CC -shared -o $FLAGS "libonyx.$suffix" *.o $LIBS
$ONYX_CC -shared $FLAGS -o "libonyx.$suffix" *.o $LIBS

rm *.o
10 changes: 10 additions & 0 deletions compiler/src/library_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ const char *onyx_stat_filepath(onyx_context_t *ctx, int32_t file_index) {
// Running WASM
//

#ifdef ONYX_RUNTIME_LIBRARY
void onyx_run_wasm(void *buffer, int32_t buffer_length, int argc, char **argv) {
onyx_run_initialize(0, NULL);

Expand All @@ -873,6 +874,15 @@ void onyx_run_wasm_with_debug(void *buffer, int32_t buffer_length, int argc, cha

onyx_run_wasm_code(wasm_bytes, argc, argv);
}
#else
void onyx_run_wasm(void *buffer, int32_t buffer_length, int argc, char **argv) {
printf("ERROR: Cannot run WASM code. No runtime was configured at the time Onyx was built")
}

void onyx_run_wasm_with_debug(void *buffer, int32_t buffer_length, int argc, char **argv, char *socket_path) {
printf("ERROR: Cannot run WASM code. No runtime was configured at the time Onyx was built")
}
#endif



Expand Down

0 comments on commit 31efe6d

Please sign in to comment.