11# *******************************************************************************
2- # Copyright (c) 2024 Contributors to the Eclipse Foundation
2+ # Copyright (c) 2024-2025 Contributors to the Eclipse Foundation
33#
44# See the NOTICE file(s) distributed with this work for additional
55# information regarding copyright ownership.
1212# *******************************************************************************
1313module (name = "communication" )
1414
15-
1615bazel_dep (name = "platforms" , version = "0.0.11" )
1716bazel_dep (name = "score_toolchains_gcc" , version = "0.4" , dev_dependency = True )
1817git_override (
@@ -21,7 +20,11 @@ git_override(
2120 commit = "fb009e490b9b8f28805d587f50d0bf6d885f3414" ,
2221)
2322
24- gcc = use_extension ("@score_toolchains_gcc//extentions:gcc.bzl" , "gcc" , dev_dependency = True )
23+ gcc = use_extension (
24+ "@score_toolchains_gcc//extentions:gcc.bzl" ,
25+ "gcc" ,
26+ dev_dependency = True ,
27+ )
2528gcc .toolchain (
2629 url = "https://linux.elektrobit.com/tmp/score/fastdev-sdk-ubuntu-ebcl-deb-qemu-arm64.tar.xz" ,
2730 sha256 = "cf8d277a2b95bbdad3e177c488fa77d01723510690a911218ef33747574d78fe" ,
@@ -36,66 +39,134 @@ gcc.extra_features(
3639 ],
3740)
3841gcc .warning_flags (
39- minimal_warnings = ["-Wall" , "-Wno-error=deprecated-declarations" ],
40- strict_warnings = ["-Wextra" , "-Wpedantic" ],
42+ minimal_warnings = [
43+ "-Wall" ,
44+ "-Wno-error=deprecated-declarations" ,
45+ ],
46+ strict_warnings = [
47+ "-Wextra" ,
48+ "-Wpedantic" ,
49+ ],
4150 treat_warnings_as_errors = ["-Werror" ],
4251)
43-
4452use_repo (gcc , "gcc_toolchain" , "gcc_toolchain_gcc" )
4553
46- bazel_dep (name = "googletest" , version = "1.15.0" )
47- bazel_dep (name = "google_benchmark" , version = "1.9.1" )
48-
49- bazel_dep (name = "rules_rust" , version = "0.61.0" )
50-
51- crate = use_extension ("@rules_rust//crate_universe:extensions.bzl" , "crate" )
54+ bazel_dep (name = "toolchains_llvm" , version = "1.5.0" , dev_dependency = True )
5255
53- crate .spec (package = "futures" , version = "0.3.31" )
54- crate .spec (package = "libc" , version = "0.2.155" )
55- crate .spec (package = "clap" , version = "4.5.4" , features = ["derive" ])
56+ llvm = use_extension (
57+ "@toolchains_llvm//toolchain/extensions:llvm.bzl" ,
58+ "llvm" ,
59+ dev_dependency = True ,
60+ )
61+ llvm .toolchain (
62+ compile_flags = {"" : [
63+ "-march=nehalem" ,
64+ "-ffp-model=strict" ,
65+ # Security
66+ "-U_FORTIFY_SOURCE" , # https://github.com/google/sanitizers/issues/247
67+ "-fstack-protector" ,
68+ "-fno-omit-frame-pointer" ,
69+ # Diagnostics
70+ "-fcolor-diagnostics" ,
71+ "-Wno-deprecated-declarations" ,
72+ "-Wno-error=self-assign-overloaded" ,
73+ "-Wthread-safety" ,
74+ ]},
75+ cxx_standard = {"" : "c++17" },
76+ link_libs = {"" : [
77+ "-lrt" ,
78+ ]},
79+ llvm_version = "16.0.0" ,
80+ stdlib = {"" : "dynamic-stdc++" },
81+ )
82+ use_repo (llvm , "llvm_toolchain" )
5683
57- crate .from_specs (name = "crate_index" )
58- use_repo (crate , "crate_index" )
84+ # We use here a pre-compiled fully static and hermetic clang_format binary
85+ # and not the one provided by llvm_toolchain, because the one from llvm_toolchain is not fully hermetic (and different version for now)
86+ download_file = use_repo_rule ("@download_utils//download/file:defs.bzl" , "download_file" )
5987
60- bazel_dep ( name = "rules_boost" , repo_name = "com_github_nelhage_rules_boost" )
61- archive_override (
62- module_name = "rules_boost" ,
63- urls = [ "https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz" ] ,
64- strip_prefix = "rules_boost- master" ,
88+ download_file (
89+ name = "clang_format" ,
90+ executable = True ,
91+ output = "executable" ,
92+ urls = [ "https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/ master-2da3e7b/clang-format-19_linux-amd64" ] ,
6593)
66- bazel_dep (name = "boost.program_options" , version = "1.87.0" )
67-
6894
95+ bazel_dep (name = "aspect_rules_lint" , version = "1.10.2" )
96+ bazel_dep (name = "googletest" , version = "1.15.0" )
97+ bazel_dep (name = "google_benchmark" , version = "1.9.1" )
98+ bazel_dep (name = "rules_rust" , version = "0.61.0" )
99+ bazel_dep (name = "buildifier_prebuilt" , version = "6.3.3" )
100+ bazel_dep (name = "score_crates" , version = "0.0.2" , repo_name = "crate_index" )
101+ bazel_dep (name = "boost.program_options" , version = "1.87.0" )
69102bazel_dep (name = "download_utils" , version = "1.0.1" )
103+
70104download_archive = use_repo_rule ("@download_utils//download/archive:defs.bzl" , "download_archive" )
105+
71106download_archive (
72107 name = "json_schema_validator" ,
73- urls = ["https://github.com/pboettch/json-schema-validator/archive/refs/tags/2.1.0.tar.gz" ],
74108 build = "//third_party/json_schema_validator:json_schema_validator.BUILD" ,
75109 strip_prefix = "json-schema-validator-2.1.0" ,
110+ urls = ["https://github.com/pboettch/json-schema-validator/archive/refs/tags/2.1.0.tar.gz" ],
111+ )
112+
113+ download_archive (
114+ name = "jsonschema" ,
115+ build = "//third_party/jsonschema:jsonschema.BUILD" ,
116+ strip_prefix = "jsonschema-4.23.0" ,
117+ urls = ["https://github.com/python-jsonschema/jsonschema/archive/refs/tags/v4.23.0.tar.gz" ],
76118)
77119
78120bazel_dep (name = "nlohmann_json" , version = "3.11.3" )
79121bazel_dep (name = "bazel_skylib" , version = "1.7.1" )
80-
81- bazel_dep (name = "score-baselibs " , version = "0.0 .0" )
122+ bazel_dep ( name = "rules_doxygen" , version = "2.5.0" )
123+ bazel_dep (name = "score_baselibs " , version = "0.2 .0" )
82124git_override (
83- module_name = "score-baselibs" ,
125+ module_name = "score_baselibs" ,
126+ commit = "e9dc2036cbdee3dce0ce51543eb34ea405326f7c" ,
127+ patch_strip = 1 ,
128+ patches = [
129+ "//:wait_free_stack_fix.patch" ,
130+ ],
84131 remote = "https://github.com/Elektrobit/eclipse-score_baselibs.git" ,
85- commit = "8fad3bceb53dc5d6120cc190b51b8b04a3f8d31f" ,
86132)
87133
88- # Python 3.12 toolchain for Bazel
134+ # Doxygen extension for documentation generation
135+ doxygen_extension = use_extension ("@rules_doxygen//:extensions.bzl" , "doxygen_extension" )
136+ use_repo (doxygen_extension , "doxygen" )
137+
138+ # Python 3.12 toolchain for Bazel (required for LOBSTER/TRLC dependencies)
89139bazel_dep (name = "rules_python" , version = "0.32.0" )
140+
90141python = use_extension ("@rules_python//python/extensions:python.bzl" , "python" )
91142python .toolchain (
92143 python_version = "3.12" ,
93144)
94145
146+ # Python pip dependencies for traceability tools
147+ pip = use_extension ("@rules_python//python/extensions:pip.bzl" , "pip" )
148+ pip .parse (
149+ hub_name = "communication_pip" ,
150+ python_version = "3.12" ,
151+ requirements_lock = "//third_party/python:requirements.txt" ,
152+ )
153+ use_repo (pip , "communication_pip" )
154+
95155# TRLC dependency for requirements traceability
96156bazel_dep (name = "trlc" , version = "0.0.0" )
97157git_override (
98158 module_name = "trlc" ,
99- remote = "https://github.com/bmw-software-engineering/trlc.git" ,
100159 commit = "650b51a47264a4f232b3341f473527710fc32669" , # trlc-2.0.2 release
160+ remote = "https://github.com/bmw-software-engineering/trlc.git" ,
161+ )
162+
163+ lobster_ext = use_extension ("//third_party/lobster:lobster.bzl" , "lobster_ext" )
164+ use_repo (lobster_ext , "lobster" )
165+
166+ # Use lobster's upstream requirements.txt directly for this module's Python hub
167+ pip .parse (
168+ hub_name = "lobster_dependencies" ,
169+ python_version = "3.12" ,
170+ requirements_lock = "@lobster//:requirements.txt" ,
101171)
172+ use_repo (pip , "lobster_dependencies" )
0 commit comments