Skip to content

Commit 31efe6d

Browse files
committed
fixed: *-none builds
1 parent 0184d32 commit 31efe6d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

compiler/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ FLAGS=""
7070
if [ ! -z ${ONYX_TARGET+x} ]; then
7171
FLAGS="$FLAGS --target=$ONYX_TARGET"
7272
fi
73-
$ONYX_CC -shared -o $FLAGS "libonyx.$suffix" *.o $LIBS
73+
$ONYX_CC -shared $FLAGS -o "libonyx.$suffix" *.o $LIBS
7474

7575
rm *.o

compiler/src/library_main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ const char *onyx_stat_filepath(onyx_context_t *ctx, int32_t file_index) {
854854
// Running WASM
855855
//
856856

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

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

874875
onyx_run_wasm_code(wasm_bytes, argc, argv);
875876
}
877+
#else
878+
void onyx_run_wasm(void *buffer, int32_t buffer_length, int argc, char **argv) {
879+
printf("ERROR: Cannot run WASM code. No runtime was configured at the time Onyx was built")
880+
}
881+
882+
void onyx_run_wasm_with_debug(void *buffer, int32_t buffer_length, int argc, char **argv, char *socket_path) {
883+
printf("ERROR: Cannot run WASM code. No runtime was configured at the time Onyx was built")
884+
}
885+
#endif
876886

877887

878888

0 commit comments

Comments
 (0)