Skip to content

Commit

Permalink
add wasm config
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongukjae committed Feb 20, 2022
1 parent e0f8afb commit ede68b4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@ build --enable_platform_specific_config
build --cxxopt='-std=c++17'
build --compilation_mode=opt

# WebAssembly Builds
build:wasm --crosstool_top=@emsdk//emscripten_toolchain:everything
build:wasm --cpu=wasm
build:wasm --copt='-Wno-unused-variable'
build:wasm --copt='-Wno-unused-but-set-variable'
build:wasm --copt='-Wno-unused-function'
build:wasm --copt='-Wno-deprecated-declarations'
build:wasm --copt='-fexceptions'
build:wasm --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

test --test_output errors
14 changes: 14 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,17 @@ http_jar(
sha256 = "a036ac9392ff6f2e668791324c26bd73963b09682ed4a0d4cbc117fd6ea3fe55",
url = "https://github.com/google/google-java-format/releases/download/v1.13.0/google-java-format-1.13.0-all-deps.jar",
)

#
http_archive(
name = "emsdk",
sha256 = "d55e3c73fc4f8d1fecb7aabe548de86bdb55080fe6b12ce593d63b8bade54567",
strip_prefix = "emsdk-3891e7b04bf8cbb3bc62758e9c575ae096a9a518/bazel",
url = "https://github.com/emscripten-core/emsdk/archive/3891e7b04bf8cbb3bc62758e9c575ae096a9a518.tar.gz",
)

load("@emsdk//:deps.bzl", emsdk_deps = "deps")
emsdk_deps()

load("@emsdk//:emscripten_deps.bzl", emsdk_emscripten_deps = "emscripten_deps")
emsdk_emscripten_deps(emscripten_version = "2.0.31")

0 comments on commit ede68b4

Please sign in to comment.