diff --git Makefile Makefile index c29088c dfc5a93 100644 --- Makefile

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/Makefile b/Makefile
index c29088c..dfc5a93 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,12 @@ endif
endif
touch src/llvm-project.CLONED
+src/python.CLONED:
+ mkdir -p src/
+ cd src/; wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
+ tar xJf Python-3.7.2.tar.xz
+ touch src/python.CLONED
+
src/musl.CLONED:
mkdir -p src/
cd src/; git clone $(MUSL_PROJECT_URL)
@@ -71,6 +77,17 @@ build/llvm.BUILT: src/llvm-project.CLONED
llvm-config
touch build/llvm.BUILT
+build/python.BUILT: src/python.CLONED
+
+ mkdir -p build/python
+ cd build/python; $(ROOT_DIR)/src/python/configure \
+ CC=$(ROOT_DIR)/dist/bin/clang \
+ CFLAGS="-O3 $(DEBUG_PREFIX_MAP)" \
+ --prefix=$(ROOT_DIR)/sysroot \
+ make -j8
+ make install
+ touch build/python.BUILT
+
build/musl.BUILT: src/musl.CLONED build/llvm.BUILT
mkdir -p build/musl
cd build/musl; $(ROOT_DIR)/src/musl/configure \
@@ -158,7 +175,7 @@ sysroot/lib/wasmception.wasm: build/llvm.BUILT basics/wasmception.c
-c -O3 -g $(DEBUG_PREFIX_MAP) \
-o sysroot/lib/wasmception.wasm
-build: build/llvm.BUILT build/musl.BUILT build/compiler-rt.BUILT build/libcxxabi.BUILT build/libcxx.BUILT $(BASICS)
+build: build/llvm.BUILT build/python.BUILT build/musl.BUILT build/compiler-rt.BUILT build/libcxxabi.BUILT build/libcxx.BUILT $(BASICS)
strip: build/llvm.BUILT
cd dist/bin; strip clang-$(LLVM_VERSION) llc lld llvm-ar