Skip to content

Commit f20ebd0

Browse files
committed
Add imports for libffi
1 parent 8a27778 commit f20ebd0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

libffi.imports

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ffi_call

tasks/ffi.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from invoke import task
1212

13-
from tasks.env import THIRD_PARTY_DIR, USABLE_CPUS
13+
from tasks.env import THIRD_PARTY_DIR, USABLE_CPUS, PROJ_ROOT
1414

1515
LIBFFI_DIR = join(THIRD_PARTY_DIR, "libffi")
1616

@@ -49,5 +49,9 @@ def build(ctx, clean=False):
4949
src_lib = join(LIBFFI_DIR, "wasm32-unknown-wasi", ".libs", "libffi.a")
5050
dest_lib = join(WASM_LIB_INSTALL, "libffi.a")
5151
print("Copying {} to {}".format(src_lib, dest_lib))
52-
run("cp {} {}".format(src_lib, dest_lib), shell=True, check=True)
52+
run("cp {} {}".format(src_lib, dest_lib), shell=True, check=True)
5353

54+
# Copy imports into place
55+
src_imports = join(PROJ_ROOT, "libffi.imports")
56+
dest_imports = join(WASM_LIB_INSTALL, "libffi.imports")
57+
run("cp {} {}".format(src_imports, dest_imports), check=True, shell=True)

0 commit comments

Comments
 (0)