Skip to content

Commit

Permalink
Add first version of the C extension
Browse files Browse the repository at this point in the history
Still WIP.
  • Loading branch information
Jb Aviat committed Jun 27, 2016
1 parent 70669c8 commit 3002957
Show file tree
Hide file tree
Showing 10 changed files with 1,309 additions and 36 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Tools used in rendering this package:
Build
--------

Just launch ./build.sh. If you prefer the detailed steps, please follow:

You need to build v8 first by hand. Ensure you have cloned the repository with the ``--recursive`` option to fetch the ``depot_tools`` submodule or run these two commands:

.. code:: bash
Expand Down
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e
set -x

git submodule init
git submodule update

python py_mini_racer/ffi/v8_build.py

python setup.py bdist_wheel


clang++ -c mini_racer_extension.cc -I py_mini_racer/ffi/v8 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wall -g -rdynamic -std=c++0x -fpermissive -fno-common -o mini_racer.o
clang++ -dynamic -bundle -o mini_racer_extension.bundle mini_racer.o -stdlib=libstdc++ -fstack-protector -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -lobjc -lpthread -lpthread -ldl -lobjc ./py_mini_racer/ffi/v8/v8/out/native/libv8_base.a

Loading

0 comments on commit 3002957

Please sign in to comment.