aboutsummaryrefslogtreecommitdiff
path: root/tests/python/readme.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/python/readme.txt')
-rw-r--r--tests/python/readme.txt35
1 files changed, 22 insertions, 13 deletions
diff --git a/tests/python/readme.txt b/tests/python/readme.txt
index 99be5b8c..2b14754c 100644
--- a/tests/python/readme.txt
+++ b/tests/python/readme.txt
@@ -1,21 +1,30 @@
-This is Python 2.7.2, compiled to .ll as follows:
+This is Python 2.7.2, compiled to .bc as follows:
- Untar Python.
- In the Python dir, create a ./bin directory
- Copy ccproxy.py to there
- CC=./ccproxy.py ../configure --without-threads --without-pymalloc
- EDIT pyconfig.h (in ./bin), remove
+Uncompress Python into two separate directories, one for native and one for JS.
+
+In the JS one, do
+ emconfigure ./configure --without-threads --without-pymalloc --enable-shared
+ EDIT pyconfig.h, remove
HAVE_GCC_ASM_FOR_X87
HAVE_SIG* except SIGNAL_H
and *add*
#define PY_NO_SHORT_FLOAT_REPR
make
- ...it will fail, but can continue manually
- cd pylibs
- ar x ../libpython2.7.a
- cp ../Modules/python.o .
- LLVM_DIR/llvm-link -o=python.bc *.o
- LLVM_DIR/llvm-dis -show-annotations python.bc
+It will fail on lack of permissions to run Parser/pgen.
+
+Go to the native one, do
+ ./configure --without-threads --without-pymalloc
+ make
+ (Note: you don't need to let it complete, just enough for Parse/pgen is sufficient.)
+ cp Parser/pgen ../YOUR_JS_DIR/Parser/
+
+Return to the JS one, do
+ chmod +x Parser/pgen
+ make
+You will get an error on lack of permissions to run ./python. Ignore that, and do
+ llvm-link libpython2.7.so python -o python.bc
+
+That's it!
-Thanks go to rasjidw for helping with this!
+Thanks to rasjidw for helping with this!