Skip to content

Commit f4e9239

Browse files
authored
build(bazel): Compile using the specified versions of GCC and G++ (#97)
build(bazel): Compile using the specified versions of G++. In Ubuntu-24, gcc-13 is used by default. Some absl syntax can be compiled normally in gcc-11 but cannot be compiled in gcc-13.
1 parent 5c9f841 commit f4e9239

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
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'

deps.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def github_archive(name, org, repo, ref, sha256):
3838
name = name,
3939
strip_prefix = repo + "-" + stripRef,
4040
urls = [
41-
"https://mirror.bazel.build/github.com/%s/%s/archive/%s.tar.gz" % (org, repo, ref),
4241
"https://github.com/%s/%s/archive/%s.tar.gz" % (org, repo, ref),
4342
],
4443
sha256 = sha256,

0 commit comments

Comments
 (0)