Skip to content

Commit 027e9a3

Browse files
authored
Update Emscripten build documentation to reflect that CppInterOp can now be tested
1 parent 625fec5 commit 027e9a3

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Emscripten-build-instructions.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ git clone https://github.com/emscripten-core/emsdk.git
2525
./emsdk/emsdk install 3.1.73
2626
```
2727

28-
and activate the emsdk environment
28+
and activate the emsdk environment (we are defining SYSROOT_PATH for use later)
2929

3030
```bash
3131
./emsdk/emsdk activate 3.1.73
3232
source ./emsdk/emsdk_env.sh
33+
export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
3334
```
3435

3536
Now clone the 19.x release of the LLVM project repository and CppInterOp (the building of the emscripten version of llvm can be
@@ -97,7 +98,7 @@ export CMAKE_PREFIX_PATH=$PREFIX
9798
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
9899
```
99100

100-
Now to build CppInterOp execute the following
101+
Now to build and test your Emscripten build of CppInterOp by executing the following
101102

102103
```bash
103104
mkdir build
@@ -109,7 +110,14 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release \
109110
-DBUILD_SHARED_LIBS=ON \
110111
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
111112
-DCMAKE_INSTALL_PREFIX=$PREFIX \
113+
-DSYSROOT_PATH=$SYSROOT_PATH \
112114
../
115+
emmake make -j $(nproc --all) check-cppinterop
116+
```
117+
118+
Assuming it passes all test you can install by executing the following
119+
120+
```bash
113121
emmake make -j $(nproc --all) install
114122
```
115123

@@ -126,7 +134,6 @@ the CppInterOp build folder, you can build the wasm version of xeus-cpp by execu
126134

127135
```bash
128136
cd ../..
129-
export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
130137
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
131138
cd ./xeus-cpp
132139
mkdir build

docs/Emscripten-build-instructions.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ This can be installed by executing (we only currently support version
3535
git clone https://github.com/emscripten-core/emsdk.git
3636
./emsdk/emsdk install 3.1.73
3737
38-
and activate the emsdk environment
38+
and activate the emsdk environment (we are defining SYSROOT_PATH for use later)
3939

4040
.. code:: bash
4141
4242
./emsdk/emsdk activate 3.1.73
4343
source ./emsdk/emsdk_env.sh
44+
export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
4445
4546
Now clone the 19.x release of the LLVM project repository and CppInterOp
4647
(the building of the emscripten version of llvm can be avoided by
@@ -115,7 +116,7 @@ You will also want to set a few environment variables
115116
export CMAKE_PREFIX_PATH=$PREFIX
116117
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
117118
118-
Now to build CppInterOp execute the following
119+
Now to build and test your Emscripten build of CppInterOp by executing the following
119120

120121
.. code:: bash
121122
@@ -128,7 +129,14 @@ Now to build CppInterOp execute the following
128129
-DBUILD_SHARED_LIBS=ON \
129130
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
130131
-DCMAKE_INSTALL_PREFIX=$PREFIX \
132+
-DSYSROOT_PATH=$SYSROOT_PATH \
131133
../
134+
emmake make -j $(nproc --all) check-cppinterop
135+
136+
Assuming it passes all test you can install by executing the following.
137+
138+
.. code:: bash
139+
132140
emmake make -j $(nproc --all) install
133141
134142
Once this finishes building we need to take note of where we built
@@ -147,7 +155,6 @@ build folder, you can build the wasm version of xeus-cpp by executing
147155
.. code:: bash
148156
149157
cd ../..
150-
export SYSROOT_PATH=$PWD/emsdk/upstream/emscripten/cache/sysroot
151158
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
152159
cd ./xeus-cpp
153160
mkdir build

0 commit comments

Comments
 (0)