Skip to content

Commit 6d83e6e

Browse files
committed
build(bazel): 使用指定版本的 GCC 和 G++ 编译- 在 .bazelrc 文件中将 CC 和 CXX 环境变量设置为 gcc-11 和 g++-11
- 在 GitHub Actions 中安装 gcc-11 和 g++-11 Change-Id: I289f0fc458e69a309ae92a53d621e0b5f8ecfb70
1 parent 5c9f841 commit 6d83e6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ build --javabase=@bazel_tools//tools/jdk:remote_jdk11
2020
build --enable_platform_specific_config
2121

2222
# Pass PATH, CC, CXX and LLVM_CONFIG variables from the environment.
23-
build --action_env=CC
24-
build --action_env=CXX
23+
build --action_env=CC=gcc-11
24+
build --action_env=CXX=g++-11
2525
build --action_env=LD_LIBRARY_PATH
2626
build --action_env=LLVM_CONFIG
2727
build --action_env=PATH

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Setup Bazel
2929
run: |
30-
sudo apt-get -qq install npm
30+
sudo apt-get -qq install npm gcc-11 g++-11
3131
sudo npm install -g @bazel/bazelisk
3232
- name: Use Bazel
3333
if: matrix.os != 'windows'

0 commit comments

Comments
 (0)