Skip to content

Commit 2192420

Browse files
Simply fence off global definition under macOS for JavaScript modules
1 parent 004e68a commit 2192420

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

jenkins/ross-debian_linux-javascript

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ISSM_CONFIG='\
1414
--without-fortran \
1515
--without-Sealevelchange \
1616
--without-Love \
17-
--without-kml \
1817
--without-kriging \
1918
--with-gsl-dir="${ISSM_DIR}/externalpackages/gsl/install" \
2019
--with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install" \

src/wrappers/Triangle/Triangle.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
1717
#endif
1818

19+
#if _IS_MAC_ == 0
20+
#ifdef _HAVE_JAVASCRIPT_MODULES_
21+
#undef _DO_NOT_LOAD_GLOBALS_ /*only module where this needs to be undefined, so as to
22+
not include IssmComm several times in the JavaScript module construct.*/
23+
#endif
24+
#endif
25+
1926
/*Header files: */
2027
#include "../bindings.h"
2128
#include "../../c/main/globals.h"

src/wrappers/javascript/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ IssmModule_SOURCES = \
9393
../IssmConfig/IssmConfig.cpp \
9494
../Issm/issm.cpp
9595

96-
IssmModule_CXXFLAGS= -O2 -fPIC -D_DO_NOT_LOAD_GLOBALS_ $(AM_CXXFLAGS) $(CXXFLAGS) -s EXPORTED_FUNCTIONS="['_free','_malloc','cwrap','getValue','_BamgMesherModule','_TriangleModule','_NodeConnectivityModule','_ContourToMeshModule','_ElementConnectivityModule','_InterpFromGridToMeshModule','_InterpFromMeshToMesh2dModule','_IssmConfigModule','_IssmModule']" -s DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1 -s INVOKE_RUN=0
96+
IssmModule_CXXFLAGS= -O2 -fPIC -D_DO_NOT_LOAD_GLOBALS_ $(AM_CXXFLAGS) $(CXXFLAGS) -sEXPORTED_FUNCTIONS="['_free','_malloc','cwrap','getValue','_BamgMesherModule','_TriangleModule','_NodeConnectivityModule','_ContourToMeshModule','_ElementConnectivityModule','_InterpFromGridToMeshModule','_InterpFromMeshToMesh2dModule','_IssmConfigModule','_IssmModule']" -sDISABLE_EXCEPTION_CATCHING=0 -sALLOW_MEMORY_GROWTH=1 -sINVOKE_RUN=0
9797
# Uncomment to disable WebAssembly and only emit JavaScript
9898
IssmModule_CXXFLAGS+= -sWASM=0
9999
# Uncomment to build JavaScript that only runs on the Web (removes support for Node.js and other environments)

0 commit comments

Comments
 (0)