This is an automated email from the ASF dual-hosted git repository.

lizhimin pushed a commit to branch zhimin/fix-bazel
in repository https://gitbox.apache.org/repos/asf/rocketmq-apis.git

commit 221b7134968c19284d7d61260dc4969642d27791
Author: lizhimins <[email protected]>
AuthorDate: Tue Oct 14 18:56:38 2025 +0800

    build(bazel): 使用指定版本的 GCC 和 G++ 编译- 在 .bazelrc 文件中将 CC 和 CXX 环境变量设置为 gcc-11 
和 g++-11
    
    Change-Id: Ia227a97d6a88c2fa063f4188eb33c70d9c3f3027
---
 .bazelrc                   | 4 ++--
 .github/workflows/main.yml | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.bazelrc b/.bazelrc
index 21901dc..874d347 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -20,8 +20,8 @@ build --javabase=@bazel_tools//tools/jdk:remote_jdk11
 build --enable_platform_specific_config
 
 # Pass PATH, CC, CXX and LLVM_CONFIG variables from the environment.
-build --action_env=CC
-build --action_env=CXX
+build --action_env=CC=gcc-11
+build --action_env=CXX=g++-11
 build --action_env=LD_LIBRARY_PATH
 build --action_env=LLVM_CONFIG
 build --action_env=PATH
\ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index feb9f2d..b4662b7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -24,10 +24,10 @@ jobs:
     steps:
       # Checks-out your repository under $GITHUB_WORKSPACE, so your job can 
access it
       - uses: actions/checkout@v2
-      
+
       - name: Setup Bazel
         run: |
-          sudo apt-get -qq install npm
+          sudo apt-get -qq install npm gcc-11 g++-11
           sudo npm install -g @bazel/bazelisk
       - name: Use Bazel
         if: matrix.os != 'windows'

Reply via email to