Skip to content

Commit

Permalink
Merge pull request mono/mono#14259 from jeromelaban/dev/jela/wasm-dlopen
Browse files Browse the repository at this point in the history
[Wasm] Add support for P/Invoke through dynamic linking

Commit migrated from mono/mono@8d80ccc
  • Loading branch information
lewing authored May 5, 2019
2 parents 75d6b0e + d5cc7c4 commit a6e773a
Show file tree
Hide file tree
Showing 4 changed files with 314 additions and 199 deletions.
8 changes: 8 additions & 0 deletions src/mono/mono/metadata/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,13 @@ libmono_icall_table_la_SOURCES = \
libmono_icall_table_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@
libmono_icall_table_la_LDFLAGS = $(libmonoldflags)
if BITCODE
if WASM
libmono_icall_table_la_LIBADD = # empty to avoid duplicate symbols when enabling dynamic linking
else
libmono_icall_table_la_LIBADD = $(glib_libs) ../utils/libmonoutils.la ../sgen/libmonosgen.la libmonoruntimesgen.la
endif
endif
endif

#
# This library contains code to generate IL at runtime
Expand All @@ -196,9 +200,13 @@ libmono_ilgen_la_SOURCES = \
libmono_ilgen_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@
libmono_ilgen_la_LDFLAGS = $(libmonoldflags)
if BITCODE
if WASM
libmono_ilgen_la_LIBADD = # empty to avoid duplicate symbols when enabling dynamic linking
else
libmono_ilgen_la_LIBADD = $(glib_libs) ../utils/libmonoutils.la ../sgen/libmonosgen.la libmonoruntimesgen.la
endif
endif
endif


CLEANFILES = mono-bundle.stamp
Expand Down
6 changes: 6 additions & 0 deletions src/mono/mono/mini/m2n-gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class Driver {
"VIIIIIIII",
"VIIIIIIIII",
"VIIIIIIIIII",
"VIIIIIIIIIII",
"VIIIIIIIIIIII",
"VIIIIIIIIIIIII",
"VIIIIIIIIIIIIII",
"I",
"II",
"III",
Expand Down Expand Up @@ -99,6 +103,8 @@ class Driver {
"VIF",
"VIFF",
"VIFFFF",
"VIFFFFF",
"VIFFFFFF",
"VIFFFFFI",
"VIIFFI",
"FF",
Expand Down
Loading

0 comments on commit a6e773a

Please sign in to comment.