Skip to content

Commit 438bf5d

Browse files
authored
build: don't require using Clang compiler. (proxy-wasm#230)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 898d2cb commit 438bf5d

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.bazelrc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
build --action_env=CC=clang
2-
build --action_env=CXX=clang++
1+
# Pass CC, CXX and PATH from the environment.
2+
build --action_env=CC
3+
build --action_env=CXX
4+
build --action_env=PATH
5+
6+
# Use Clang compiler.
7+
build:clang --action_env=BAZEL_COMPILER=clang
8+
build:clang --action_env=CC=clang
9+
build:clang --action_env=CXX=clang++
310

411
build --enable_platform_specific_config
512

.github/workflows/cpp.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
bazel build
7878
--verbose_failures
7979
--test_output=errors
80+
--config=clang
8081
-c opt
8182
$(bazel query 'kind(was.*_rust_binary, //test/test_data/...)')
8283
@@ -119,7 +120,7 @@ jobs:
119120
os: ubuntu-20.04
120121
arch: x86_64
121122
action: test
122-
flags: '--define crypto=system'
123+
flags: --config=clang --define=crypto=system
123124
- name: 'V8 on macOS/x86_64'
124125
runtime: 'v8'
125126
repo: 'v8'
@@ -132,6 +133,7 @@ jobs:
132133
os: ubuntu-20.04
133134
arch: x86_64
134135
action: test
136+
flags: --config=clang
135137
- name: 'WAMR on macOS/x86_64'
136138
runtime: 'wamr'
137139
repo: 'com_github_bytecodealliance_wasm_micro_runtime'
@@ -144,19 +146,22 @@ jobs:
144146
os: ubuntu-20.04
145147
arch: x86_64
146148
action: test
149+
flags: --config=clang
147150
- name: 'Wasmtime on Linux/aarch64'
148151
runtime: 'wasmtime'
149152
repo: 'com_github_bytecodealliance_wasmtime'
150153
os: ubuntu-20.04
151154
arch: aarch64
152155
action: build
156+
flags: --config=clang
153157
run_under: docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/arm64 piotrsikora/build-tools:bazel-5.0.0-clang-13-gcc-11
154158
- name: 'Wasmtime on Linux/s390x'
155159
runtime: 'wasmtime'
156160
repo: 'com_github_bytecodealliance_wasmtime'
157161
os: ubuntu-20.04
158162
arch: s390x
159163
action: test
164+
flags: --config=clang
160165
run_under: docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/s390x piotrsikora/build-tools:bazel-5.0.0-clang-13-gcc-11
161166
- name: 'Wasmtime on macOS/x86_64'
162167
runtime: 'wasmtime'
@@ -170,6 +175,7 @@ jobs:
170175
os: ubuntu-20.04
171176
arch: x86_64
172177
action: test
178+
flags: --config=clang
173179

174180
steps:
175181
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)