File tree Expand file tree Collapse file tree
recipes/recipes_emscripten/sparrow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,5 +16,15 @@ emcmake cmake .. \
1616 -DBUILD_TESTS=OFF \
1717 -DBUILD_DOCS=OFF
1818
19- # Build and install
19+ # Build step
20+ emmake make -j8
21+
22+ emcc bin/Release/libsparrow.a \
23+ $EM_FORGE_SIDE_MODULE_LDFLAGS \
24+ -o libsparrow.so
25+
26+ # Install step
2027emmake make install -j8
28+
29+ # Manually install the shared library
30+ cp libsparrow.so " $PREFIX /lib/"
Original file line number Diff line number Diff line change 1+ diff --git a/include/sparrow/details/3rdparty/float16_t.hpp b/include/sparrow/details/3rdparty/float16_t.hpp
2+ index 1e1c417..e6aec4c 100644
3+ --- a/include/sparrow/details/3rdparty/float16_t.hpp
4+ +++ b/include/sparrow/details/3rdparty/float16_t.hpp
5+ @@ -196,6 +196,30 @@
6+ #define FE_ALL_EXCEPT (FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT)
7+ #endif
8+
9+ + #ifdef __EMSCRIPTEN__
10+ + // Emscripten defines FE_ALL_EXCEPT as 0, which causes the fallback above to be skipped,
11+ + // but does not define the individual FE_* macros. So we patch them manually here.
12+ +
13+ + #ifndef FE_INEXACT
14+ + #define FE_INEXACT 0x02
15+ + #endif
16+ + #ifndef FE_INVALID
17+ + #define FE_INVALID 0x04
18+ + #endif
19+ + #ifndef FE_OVERFLOW
20+ + #define FE_OVERFLOW 0x08
21+ + #endif
22+ + #ifndef FE_UNDERFLOW
23+ + #define FE_UNDERFLOW 0x10
24+ + #endif
25+ + #ifndef FE_DIVBYZERO
26+ + #define FE_DIVBYZERO 0x01
27+ + #endif
28+ + #ifndef FE_ALL_EXCEPT
29+ + #define FE_ALL_EXCEPT (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
30+ + #endif
31+ + #endif // __EMSCRIPTEN__
32+ +
33+
34+ /// Main namespace for half-precision functionality.
35+ /// This namespace contains all the functionality provided by the library.
Original file line number Diff line number Diff line change 11context :
2- version : 0.9 .0
2+ version : 1.0 .0
33
44package :
55 name : sparrow
66 version : ${{ version }}
77
88source :
99 url : https://github.com/man-group/sparrow/archive/${{ version }}.tar.gz
10- sha256 : f8bd0b19d5e76dc972385a4263e5db0cded63d326dfb0cd57c3ad9f2f6dea570
10+ sha256 : 14199ae6416e4b6ed62419e4def6602a0d804c1d26ca0917d3818f06b9d33d6e
11+ patches :
12+ - patches/add-missing-fe-macros-emscripten.patch
1113
1214build :
1315 number : 0
You can’t perform that action at this time.
0 commit comments