Skip to content

Commit de384b4

Browse files
committed
Enforce c++17
1 parent 6a379ea commit de384b4

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
# This runs all commands within the compiler/ directory
4949
working-directory: ./compiler
5050
run: |
51-
bazel build //src:protoc-gen-rust-grpc
51+
bazel build //src:protoc-gen-rust-grpc --enable_platform_specific_config
5252
5353
# Add the output directory to the GitHub PATH for subsequent steps
5454
echo "$(pwd)/bazel-bin/src" >> $GITHUB_PATH
@@ -89,7 +89,7 @@ jobs:
8989
# This runs all commands within the compiler/ directory
9090
working-directory: ./compiler
9191
run: |
92-
bazel build //src:protoc-gen-rust-grpc
92+
bazel build //src:protoc-gen-rust-grpc --enable_platform_specific_config
9393
9494
# Add the output directory to the GitHub PATH for subsequent steps
9595
echo "$(pwd)/bazel-bin/src" >> $GITHUB_PATH
@@ -129,7 +129,7 @@ jobs:
129129
# This runs all commands within the compiler/ directory
130130
working-directory: ./compiler
131131
run: |
132-
bazel build //src:protoc-gen-rust-grpc
132+
bazel build //src:protoc-gen-rust-grpc --enable_platform_specific_config
133133
134134
# Add the output directory to the GitHub PATH for subsequent steps
135135
echo "$(pwd)/bazel-bin/src" >> $GITHUB_PATH
@@ -187,7 +187,7 @@ jobs:
187187
# This runs all commands within the compiler/ directory
188188
working-directory: ./compiler
189189
run: |
190-
bazel build //src:protoc-gen-rust-grpc
190+
bazel build //src:protoc-gen-rust-grpc --enable_platform_specific_config
191191
192192
# Add the output directory to the GitHub PATH for subsequent steps
193193
echo "$(pwd)/bazel-bin/src" >> $GITHUB_PATH
@@ -232,7 +232,7 @@ jobs:
232232
# This runs all commands within the compiler/ directory
233233
working-directory: ./compiler
234234
run: |
235-
bazel build //src:protoc-gen-rust-grpc
235+
bazel build //src:protoc-gen-rust-grpc --enable_platform_specific_config
236236
237237
# Add the output directory to the GitHub PATH for subsequent steps
238238
echo "$(pwd)/bazel-bin/src" >> $GITHUB_PATH

compiler/.bazelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Define a custom config for common Unix-like flags
2+
build:unix --cxxopt=-std=c++17
3+
build:unix --host_cxxopt=-std=c++17
4+
5+
# Inherit the common 'unix' flags for both macOS and Linux
6+
build:macos --config=unix
7+
build:linux --config=unix
8+
9+
# Windows flags remain as they are
10+
build:windows --cxxopt=/std:c++17
11+
build:windows --host_cxxopt=/std:c++17
12+

0 commit comments

Comments
 (0)