Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use emcmake when building BoringSSL with Emscripten #602

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Mar 9, 2020

Emscripten toolchain includes emconfigure tool which sets various standard variables to setup crosscompilation. Since v1.14.1 Emscripten includes emcmake tool which is effectively emconfigure for CMake.

Themis can build embedded BoringSSL when it is selected as cryptographic backend. With Emscripten we always use (and build) embedded BoringSSL. For that we use emconfigure cmake to configure the build.

Since Emscripten v1.39.9 (released 3 days ago) it is now mandatory to use emcmake for CMake configuration, as evident from the following error message:

$ emmake make wasmthemis
make: make wasmthemis
building embedded BoringSSL...
error: use `emcmake` rather then `emconfigure` for cmake projects
make: *** [build/boringssl/crypto/libcrypto.a] Error 1

Use emmake if it is available, otherwise fall back to emconfigure when building embedded BoringSSL with Emscripten.

Interface for Themis users does not change: it's still simply emmake make wasmthemis and we take care of all compatibility details.

Checklist

  • Change is covered by automated tests
  • The coding guidelines are followed
  • Public API has proper documentation

Emscripten toolchain includes "emconfigure" tool which sets various
standard variables to setup crosscompilation. Since v1.14.1 Emscripten
include "emcmake" tool which is effectively emconfigure for CMake.

Themis can build embedded BoringSSL when it is selected as cryptographic
backend. With Emscriptedn we always use (and build) embedded BoringSSL.
For that we use "emconfigure cmake" to configure the build.

Since Emscripten v1.39.9 it is now mandatory to use "emcmake" for CMake
configuration, as it is evident from the following error message:

    $ emmake make wasmthemis
    make: make wasmthemis
    building embedded BoringSSL...
    error: use `emcmake` rather then `emconfigure` for cmake projects
    make: *** [build/boringssl/crypto/libcrypto.a] Error 1

Use emmake if it is available, otherwise fall back to emconfigure when
building embedded BoringSSL with Emscripten.
@ilammy ilammy added compatibility Backward and forward compatibility, platform interoperability issues, breaking changes W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages labels Mar 9, 2020
@ilammy ilammy merged commit 9e94976 into cossacklabs:master Mar 10, 2020
@ilammy ilammy deleted the emcmake branch March 11, 2020 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Backward and forward compatibility, platform interoperability issues, breaking changes W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants