From dc77ca9697a8e01625466a6032c23472b69fc21d Mon Sep 17 00:00:00 2001 From: seaubot <81010316+seaubot@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:57:07 -0700 Subject: [PATCH] chore: sync with ecsact_common (#193) --- bazel/BUILD.bazel | 4 ++++ bazel/common.bazelrc | 3 --- bazel/copts.bzl | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) 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",