Skip to content

Commit c469454

Browse files
committed
Use new toolchain
1 parent c348284 commit c469454

File tree

4 files changed

+77
-47
lines changed

4 files changed

+77
-47
lines changed

.bazelrc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry
99
common --registry=https://bcr.bazel.build
1010
common --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py
1111

12-
build:build_qnx8 --platforms=@score_bazel_platforms//:arm64-qnx8_0
13-
build:build_qnx8 --extra_toolchains=@toolchains_qnx_qcc//:qcc_aarch64
14-
build:build_qnx8 --extra_toolchains=@score_toolchains_rust//toolchains/aarch64-unknown-qnx8_0:toolchain_aarch64_qnx8_0
15-
build:build_qnx8 --extra_toolchains=@score_toolchains_rust//toolchains/x86_64-unknown-linux-gnu:toolchain_x86_64_linux
16-
build:build_qnx8 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64
17-
build:build_qnx8 --extra_toolchains=@toolchains_qnx_ifs//:ifs_aarch64
12+
build:arm64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix
13+
build:arm64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix
14+
build:arm64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800
1815

19-
common --extra_toolchains=@gcc_toolchain//:host_gcc_12
16+
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix
17+
build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix
18+
build:x86_64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800
19+
20+
# TODO arm64 when rust support is there
21+
22+
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
23+
build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
24+
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
25+
26+
# to be removed
27+
build:build_qnx8 --config=arm64-qnx

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ jobs:
5555
5656
- name: Build with Bazel
5757
run: |
58-
bazel build //...
58+
bazel build --config x86_64-linux //...

.github/workflows/build_qnx8.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,28 @@ on:
1818
merge_group:
1919
types: [checks_requested]
2020
jobs:
21-
qnx-build:
21+
qnx-build-arm64:
2222
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main
2323
permissions:
2424
contents: read
2525
pull-requests: read
2626
with:
2727
bazel-target: '//src/...'
28-
bazel-config: 'build_qnx8'
28+
bazel-config: 'arm64-qnx8'
29+
credential-helper: 'scripts/internal/qnx_creds.py'
30+
environment-name: 'workflow-approval'
31+
secrets:
32+
score-qnx-license: ${{ secrets.SCORE_QNX_LICENSE }}
33+
score-qnx-user: ${{ secrets.SCORE_QNX_USER }}
34+
score-qnx-password: ${{ secrets.SCORE_QNX_PASSWORD }}
35+
qnx-build-x86_64:
36+
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main
37+
permissions:
38+
contents: read
39+
pull-requests: read
40+
with:
41+
bazel-target: '//src/...'
42+
bazel-config: 'x86_64-qnx8'
2943
credential-helper: 'scripts/internal/qnx_creds.py'
3044
environment-name: 'workflow-approval'
3145
secrets:

MODULE.bazel

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
2626
bazel_dep(name = "platforms", version = "1.0.0")
2727

2828
# S-CORE process rules
29-
bazel_dep(name = "score_bazel_platforms", version = "0.0.3")
29+
bazel_dep(name = "score_bazel_platforms", version = "0.0.4")
3030
bazel_dep(name = "score_docs_as_code", version = "2.2.0")
3131
bazel_dep(name = "score_tooling", version = "1.0.4")
3232

@@ -35,10 +35,8 @@ bazel_dep(name = "score_platform", version = "0.4.2", dev_dependency = True) #
3535
bazel_dep(name = "score_virtualization", version = "0.0.1", dev_dependency = True)
3636

3737
# Toolchains and extensions
38-
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = True)
39-
bazel_dep(name = "score_toolchains_qnx", version = "0.0.6", dev_dependency = True)
40-
bazel_dep(name = "rust_qnx8_toolchain", version = "1.2.0", dev_dependency = True)
41-
bazel_dep(name = "score_toolchains_rust", version = "0.1.1", dev_dependency = True)
38+
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True)
39+
bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True)
4240

4341
# Others
4442
bazel_dep(name = "custom_qemu", version = "1.0.0", dev_dependency = True)
@@ -54,20 +52,6 @@ git_override(
5452
remote = "https://github.com/qorix-group/score_virtualization.git",
5553
)
5654

57-
git_override(
58-
module_name = "score_toolchains_rust",
59-
commit = "bcf8e5364f72cf136ec81960350a82e2b5c45449",
60-
remote = "https://github.com/eclipse-score/toolchains_rust.git",
61-
)
62-
63-
archive_override(
64-
module_name = "rust_qnx8_toolchain",
65-
strip_prefix = "qnx8",
66-
urls = [
67-
"https://github.com/qorix-group/rust-lang-qnx8/releases/download/1.2.0/qnx8_rust_toolchain.tar.gz",
68-
],
69-
)
70-
7155
archive_override(
7256
module_name = "custom_qemu",
7357
integrity = "sha256-3V2d+p7nP0tsbrVWOPYUSJogLNal43CIAHEto6Vjdfg=",
@@ -77,21 +61,43 @@ archive_override(
7761
],
7862
)
7963

80-
# Extensions
81-
82-
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = True)
64+
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
8365
gcc.toolchain(
84-
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
85-
strip_prefix = "x86_64-unknown-linux-gnu",
86-
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
66+
name = "score_gcc_x86_64_toolchain",
67+
target_cpu = "x86_64",
68+
target_os = "linux",
69+
use_default_package = True,
70+
version = "12.2.0",
8771
)
88-
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
89-
90-
toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx", dev_dependency = True)
91-
toolchains_qnx.sdp(
92-
sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
93-
strip_prefix = "installation",
94-
url = "https://www.qnx.com/download/download/79858/installation.tgz",
72+
gcc.toolchain(
73+
name = "score_gcc_aarch64_toolchain",
74+
target_cpu = "aarch64",
75+
target_os = "linux",
76+
use_default_package = True,
77+
version = "12.2.0",
78+
)
79+
gcc.toolchain(
80+
name = "score_qcc_x86_64_toolchain",
81+
sdp_version = "8.0.0",
82+
target_cpu = "x86_64",
83+
target_os = "qnx",
84+
use_default_package = True,
85+
version = "12.2.0",
86+
)
87+
gcc.toolchain(
88+
name = "score_qcc_aarch64_toolchain",
89+
sdp_version = "8.0.0",
90+
target_cpu = "aarch64",
91+
target_os = "qnx",
92+
use_default_package = True,
93+
version = "12.2.0",
94+
)
95+
use_repo(
96+
gcc,
97+
"score_gcc_aarch64_toolchain",
98+
"score_gcc_x86_64_toolchain",
99+
"score_qcc_aarch64_toolchain",
100+
"score_qcc_x86_64_toolchain",
95101
)
96102

97103
PYTHON_VERSION = "3.12"
@@ -113,9 +119,11 @@ use_repo(python)
113119

114120
use_repo(pip, "pip_score_venv_test")
115121

116-
use_repo(toolchains_qnx, "toolchains_qnx_sdp")
117-
use_repo(toolchains_qnx, "toolchains_qnx_qcc")
118-
use_repo(toolchains_qnx, "toolchains_qnx_ifs")
119-
120122
# S-CORE crates
121-
bazel_dep(name = "score_crates", version = "0.0.5")
123+
bazel_dep(name = "score_crates", version = "0.0.7")
124+
125+
git_override(
126+
module_name = "rules_rust",
127+
commit = "92b2d001f7b2c12125851839c7b35046eab08848",
128+
remote = "https://github.com/pawelrutkaq/rules_rust.git", # To be fixed once rule_rust is in score bazel registry
129+
)

0 commit comments

Comments
 (0)