Skip to content

Commit 415317b

Browse files
committed
Add host GCC 12.2.0 toolchain
Add host GNU GCC 12.2.0 toolchain for unittesting.
1 parent 46603aa commit 415317b

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.bazelrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
114
build --java_language_version=17
215
build --tool_java_language_version=17
316
build --java_runtime_version=remotejdk_17

MODULE.bazel

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,26 @@ llvm.toolchain(
3535
use_repo(llvm, "llvm_toolchain")
3636
use_repo(llvm, "llvm_toolchain_llvm")
3737

38-
register_toolchains("@llvm_toolchain//:all")
38+
# GCC Toolchain Rules - host configuration
39+
bazel_dep(name = "score_toolchains_gcc", version = "0.1")
40+
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc")
41+
gcc.toolchain(
42+
url = "https://github.com/eclipse-score/toolchains_gcc/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
43+
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
44+
strip_prefix = "x86_64-unknown-linux-gnu",
45+
)
46+
gcc.extra_features(
47+
features = [
48+
"minimal_warnings",
49+
"treat_warnings_as_errors",
50+
],
51+
)
52+
gcc.warning_flags(
53+
minimal_warnings = ["-Wall", "-Wno-error=deprecated-declarations"],
54+
strict_warnings = ["-Wextra", "-Wpedantic"],
55+
treat_warnings_as_errors = ["-Werror"],
56+
)
57+
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
3958

4059
# Dash license checker
4160
bazel_dep(name = "dash_license_checker", version = "0.1.0")

0 commit comments

Comments
 (0)