Skip to content

Commit

Permalink
Update building.md to match updated sdk_container.sh
Browse files Browse the repository at this point in the history
This is a followup to the previous commits that refreshed the build
scripts and emsdk. This change reconciles the docs with the current
state of the build scripts.

Signed-off-by: Mikhail Krinkin <[email protected]>
  • Loading branch information
krinkinmu committed Oct 10, 2024
1 parent 90d8c07 commit 9c373b0
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ sudo make install
```bash
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk update-tags
./emsdk install 3.1.7
./emsdk activate 3.1.7
git checkout 3.1.67

./emsdk install 3.1.67
./emsdk activate 3.1.67

source ./emsdk_env.sh
```
Expand All @@ -178,21 +179,18 @@ It is possible later versions will work, e.g.
./emsdk activate latest
```

However 3.1.7 is known to work.
However 3.1.67 is known to work.

### Rebuilding the libprotobuf.a files

If want to rebuild the libprotobuf.a files using a version of protobuf prior to
3.15, see the instructions at https://github.com/kwonoj/protobuf-wasm. Commit
4bba8b2f38b5004f87489642b6ca4525ae72fe7f works for protobuf v3.9.x.
To build the protobuf static libraries, if you need them, you may use
Emscripten in the same way sdk\_container.sh does it:

```bash
git clone https://github.com/protocolbuffers/protobuf protobuf-wasm
cd protobuf-wasm
git checkout v3.9.1
git clone https://github.com/kwonoj/protobuf-wasm wasm-patches
cd wasm-patches && git checkout 4bba8b2f38b5004f87489642b6ca4525ae72fe7f && cd ..
git apply wasm-patches/*.patch
git submodule update --init --recursive
./autogen.sh
emconfigure ./configure --disable-shared CXXFLAGS="-O3 -flto"
emmake make
Expand Down

0 comments on commit 9c373b0

Please sign in to comment.