diff --git a/bazel/BUILD.bazel b/bazel/BUILD.bazel index e69de29..c9e1c55 100644 --- a/bazel/BUILD.bazel +++ b/bazel/BUILD.bazel @@ -0,0 +1,4 @@ +config_setting( + name = "compiler_emscripten", + flag_values = {"@bazel_tools//tools/cpp:compiler": "emscripten"}, +) diff --git a/bazel/common.bazelrc b/bazel/common.bazelrc index 1bb6433..ebb4c3e 100644 --- a/bazel/common.bazelrc +++ b/bazel/common.bazelrc @@ -1,6 +1,3 @@ -# This file is maintained by ecsact-dev/ecsact_common -# If changes are required please make them there - startup --windows_enable_symlinks common --enable_bzlmod common --registry=https://raw.githubusercontent.com/ecsact-dev/bazel_registry/main diff --git a/bazel/copts.bzl b/bazel/copts.bzl index 8ddeb95..2a49358 100644 --- a/bazel/copts.bzl +++ b/bazel/copts.bzl @@ -1,7 +1,10 @@ load("@bazel_skylib//lib:selects.bzl", "selects") -# Ecsact repositories currently only support clang and cl +# Ecsact repositories currently only support clang, cl, and emscripten copts = selects.with_or({ + (Label("//bazel:compiler_emscripten")): [ + "-std=c++20", + ], ("@rules_cc//cc/compiler:clang"): [ "-std=c++2b", "-fexperimental-library",