Skip to content

Commit 80e4e74

Browse files
seaubotzaucy
andauthored
chore: sync with ecsact_common (#103)
Co-authored-by: seaubot <[email protected]> Co-authored-by: Ezekiel Warren <[email protected]>
1 parent eb84a44 commit 80e4e74

File tree

8 files changed

+36
-21
lines changed

8 files changed

+36
-21
lines changed

.bazelrc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
startup --windows_enable_symlinks
2+
common --enable_bzlmod
13
build --enable_platform_specific_config
24
build --incompatible_use_platforms_repo_for_constraints
35
build --incompatible_enable_cc_toolchain_resolution
46
build --incompatible_strict_action_env
7+
build --enable_runfiles
8+
build --noincompatible_remove_rule_name_parameter
9+
query --noincompatible_remove_rule_name_parameter
510

6-
build:windows --platforms=//bazel/platforms:windows
7-
8-
build:linux --platforms=//bazel/platforms:linux
11+
# Temporary until https://github.com/grailbio/bazel-toolchain/pull/198 is merged
912
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
1013

11-
build:no-warnings --per_file_copt=//.*@-Werror
12-
1314
common:ci --announce_rc
15+
common:ci --verbose_failures
16+
common:ci --keep_going
1417
common:ci --disk_cache=~/.cache/bazel-disk-cache
18+
19+
try-import %workspace%/user.bazelrc

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.3.2

.github/workflows/main.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v3
1818
- uses: jidicula/[email protected]
19-
with: { clang-format-version: "15" }
20-
test-windows:
19+
with: { clang-format-version: "16" }
2120

21+
test-windows:
2222
runs-on: windows-latest
2323
steps:
24-
- name: bazel visual studio 17.6+ workaround # https://github.com/bazelbuild/bazel/issues/18592
25-
run: Remove-Item -Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg" -Force -Recurse
2624
- uses: actions/cache@v3
2725
with:
2826
path: |
@@ -31,6 +29,7 @@ jobs:
3129
key: ${{runner.os}}-bazel-cache
3230
- uses: actions/checkout@v3
3331
- run: bazel test --config=ci //...
32+
3433
test-linux:
3534
runs-on: ubuntu-latest
3635
steps:
@@ -41,4 +40,4 @@ jobs:
4140
~/.cache/bazel-disk-cache
4241
key: ${{runner.os}}-bazel-cache
4342
- uses: actions/checkout@v3
44-
- run: bazel test --config=ci --config=no-warnings //...
43+
- run: bazel test --config=ci //...

MODULE.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module(name = "ecsact_parse")
2+
3+
bazel_dep(name = "rules_cc", version = "0.0.8")
4+
bazel_dep(name = "bazel_skylib", version = "1.4.2")

WORKSPACE.bazel

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain")
3838

3939
llvm_toolchain(
4040
name = "llvm_toolchain",
41-
cxx_standard = {"linux": "c++20"},
42-
distribution = "clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz",
43-
llvm_version = "15.0.6",
41+
llvm_version = "16.0.4",
4442
)
4543

4644
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")

bazel/copts.bzl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
copts = select({
2-
"@bazel_tools//tools/cpp:msvc": ["/std:c++latest"],
3-
"//conditions:default": ["-std=c++20"],
1+
load("@bazel_skylib//lib:selects.bzl", "selects")
2+
3+
# Ecsact repositories currently only support clang and cl
4+
copts = selects.with_or({
5+
("@rules_cc//cc/compiler:clang"): [
6+
"-std=c++2b",
7+
"-fexperimental-library",
8+
],
9+
("@rules_cc//cc/compiler:msvc-cl", "@rules_cc//cc/compiler:clang-cl"): [
10+
"/std:c++latest",
11+
"/permissive-",
12+
"/Zc:preprocessor",
13+
],
414
})

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"extends": [
44
"github>ecsact-dev/renovate-config"
55
]
6-
}
6+
}

repositories.bzl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
33

44
_LEXY_BUILD_FILE_CONTENT = """
55
load("@rules_cc//cc:defs.bzl", "cc_library")
6+
load("@ecsact_parse//bazel:copts.bzl", "copts")
67
78
cc_library(
89
name = "lexy",
@@ -11,10 +12,7 @@ cc_library(
1112
hdrs = glob(["include/**/*.hpp"]),
1213
srcs = ["src/input/file.cpp"],
1314
strip_include_prefix = "include",
14-
copts = select({
15-
"@bazel_tools//tools/cpp:msvc": ["/std:c++latest"],
16-
"//conditions:default": ["-std=c++20"],
17-
}),
15+
copts = copts,
1816
)
1917
"""
2018

0 commit comments

Comments
 (0)