Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wasm-study
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
wasm-study
Commits
aef1076a
Commit
aef1076a
authored
Nov 07, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parents
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
Makefile
Makefile
+7
-0
dso.h
dso.h
+12
-0
libk.c
libk.c
+6
-0
libk.h
libk.h
+14
-0
No files found.
Makefile
0 → 100644
View file @
aef1076a
CC
:=
emcc
-s
WASM
=
1
SO
:=
wasm
all
:
libk_so.$(SO)
libk_so.$(SO)
:
$(CC)
-s
SIDE_MODULE
=
1
-DLIBK_COMPILE
-o
$@
libk.c
dso.h
0 → 100644
View file @
aef1076a
#ifndef _DSO_H
#define _DSO_H
// DSO_EXPORT marks a symbol as exported from currently-compiled DSO.
// XXX + attr(used) ? (emscripten does this)
#define DSO_EXPORT __attribute__((visibility("default")))
// XXX stub (__declspec(dllimport) on mingw)
#define DSO_IMPORT
#endif
libk.c
0 → 100644
View file @
aef1076a
#include "libk.h"
LIBKAPI
int
kfunc1
()
{
return
12
;
}
libk.h
0 → 100644
View file @
aef1076a
#ifndef _LIBK_H
#define _LIBK_H
#include "dso.h"
#ifdef LIBK_COMPILE
# define LIBKAPI DSO_EXPORT
#else
# define LIBKAPI DSO_IMPORT
#endif
LIBKAPI
int
kfunc1
();
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment