File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,5 @@ cmake \
15
15
-DCMAKE_INSTALL_PREFIX=` pwd` /inst \
16
16
.
17
17
cmake --build . -j16 --target install
18
+
19
+ emcc -DWASM_RT_LIB src/libasr/runtime/lfortran_intrinsics.c -o src/libasr/runtime/rt_lib.wasm -s WASM=1 --no-entry
Original file line number Diff line number Diff line change 6
6
#include <inttypes.h>
7
7
#include <stdbool.h>
8
8
9
+ #ifdef WASM_RT_LIB
10
+ #include <emscripten.h>
11
+ #endif
12
+
9
13
#ifdef __cplusplus
10
14
extern "C" {
11
15
#endif
@@ -34,6 +38,11 @@ typedef double _Complex double_complex_t;
34
38
#define LFORTRAN_API /* Nothing */
35
39
#endif
36
40
41
+ #ifdef WASM_RT_LIB
42
+ #undef LFORTRAN_API
43
+ #define LFORTRAN_API EMSCRIPTEN_KEEPALIVE
44
+ #endif
45
+
37
46
LFORTRAN_API double _lfortran_sum (int n , double * v );
38
47
LFORTRAN_API void _lfortran_random_number (int n , double * v );
39
48
LFORTRAN_API double _lfortran_random ();
You can’t perform that action at this time.
0 commit comments