-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMODULE.bazel
More file actions
168 lines (154 loc) · 6.15 KB
/
Copy pathMODULE.bazel
File metadata and controls
168 lines (154 loc) · 6.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
module(
name = "score_test_bazel_cpp_toolchains",
version = "0.1.0",
)
# *******************************************************************************
# Common useful functions and rules for Bazel
# *******************************************************************************
bazel_dep(name = "bazel_skylib", version = "1.8.2")
# *******************************************************************************
# Constraint values for specifying platforms and toolchains
# *******************************************************************************
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "score_bazel_platforms", version = "0.1.1")
# *******************************************************************************
# C++ Rules for Bazel
# *******************************************************************************
bazel_dep(name = "rules_cc", version = "0.2.14")
bazel_dep(name = "googletest", version = "1.17.0")
# *******************************************************************************
# Set dependency to Bazel C/C++ Toolchain repository - with overriding path
# *******************************************************************************
bazel_dep(
name = "score_bazel_cpp_toolchains",
version = "0.4.0",
)
local_path_override(
module_name = "score_bazel_cpp_toolchains",
path = "../",
)
# *******************************************************************************
# Init GCC extention
# Legend:
# * CPU: Control Processeor Unit
# * OS: Operating System
# * V: Version (GCC or SDP)
# * ES: Runtime-EcoSystem
#
# *******************************************************************************
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
# *******************************************************************************
# Setting default GCC (CPU:x86_64|OS:Linux|V:12.2.0|ES:posix)
# *******************************************************************************
gcc.toolchain(
name = "score_gcc_toolchain_bp",
target_cpu = "x86_64",
target_os = "linux",
use_base_constraints_only = True,
use_default_package = True,
version = "12.2.0",
)
# *******************************************************************************
# Setting default GCC (CPU:x86_64|OS:Linux|V:12.2.0|ES:posix)
# *******************************************************************************
gcc.toolchain(
name = "score_gcc_toolchain",
target_cpu = "x86_64",
target_os = "linux",
use_default_package = True,
version = "12.2.0",
)
# *******************************************************************************
# Setting default GCC (CPU:aarch64|OS:Linux|V:12.2.0|ES:posix)
# *******************************************************************************
gcc.toolchain(
name = "score_aarch64_gcc_toolchain",
target_cpu = "aarch64",
target_os = "linux",
use_default_package = True,
version = "12.2.0",
)
# *******************************************************************************
# Setting custom GCC (CPU:x86_64|OS:Linux|V:12.2.0|ES:posix)
# *******************************************************************************
gcc.sdp(
name = "my_toolchain_pkg",
build_file = "@score_bazel_cpp_toolchains//packages/linux/x86_64/gcc/12.2.0:gcc.BUILD",
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
strip_prefix = "x86_64-unknown-linux-gnu",
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
)
gcc.toolchain(
name = "my_toolchain",
extra_link_flags = [
"-lpthread",
],
sdp_to_link = "my_toolchain_pkg",
target_cpu = "x86_64",
target_os = "linux",
version = "12.2.0",
)
# *******************************************************************************
# Setting GCC (CPU:x86_64|OS:QNX|version(sdp):8.0.0|ES:posix)
# *******************************************************************************
gcc.toolchain(
name = "score_qcc_toolchain",
sdp_version = "8.0.0",
target_cpu = "x86_64",
target_os = "qnx",
use_default_package = True,
)
# *******************************************************************************
# Setting GCC (CPU:aarch64|OS:QNX|version(sdp):8.0.0|ES:posix)
# *******************************************************************************
gcc.toolchain(
name = "score_qcc_arm_toolchain",
sdp_version = "8.0.0",
target_cpu = "aarch64",
target_os = "qnx",
use_default_package = True,
)
# *******************************************************************************
# Setting AutoSD 10 GCC (CPU:x86_64|OS:Linux|ES:autosd10)
# *******************************************************************************
gcc.toolchain(
name = "score_autosd_10_toolchain",
runtime_ecosystem = "autosd10",
target_cpu = "x86_64",
target_os = "linux",
use_default_package = True,
)
# *******************************************************************************
# Setting EBcLfSA 0.1.0 GCC (CPU:aarch64|OS:Linux|V:ebclfsa-0.1.0|ES:ebclfsa)
# *******************************************************************************
gcc.toolchain(
name = "score_ebclfsa_toolchain",
runtime_ecosystem = "ebclfsa",
sdk_version = "0.1.0",
target_cpu = "aarch64",
target_os = "linux",
use_default_package = True,
)
use_repo(
gcc,
"my_toolchain",
"score_aarch64_gcc_toolchain",
"score_autosd_10_toolchain",
"score_ebclfsa_toolchain",
"score_gcc_toolchain",
"score_gcc_toolchain_bp",
"score_qcc_arm_toolchain",
"score_qcc_toolchain",
)