import rust-1.82.0-1.el10

cs10 imports/cs10/rust-1.82.0-1.el10
MSVSphere Packaging Team 3 weeks ago
parent 9ffae4e86e
commit 960a723059
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

2
.gitignore vendored

@ -1,2 +1,2 @@
SOURCES/rustc-1.81.0-src.tar.xz
SOURCES/rustc-1.82.0-src.tar.xz
SOURCES/wasi-libc-b9ef79d7dbd47c6c5bafdae760823467c2f60b70.tar.gz

@ -1,2 +1,2 @@
51c4bf505e1ca421cf8dcedb6d05acc2873f7eb4 SOURCES/rustc-1.81.0-src.tar.xz
eaa11a8e936e36aabed6602b97f17770f3a7d6fb SOURCES/rustc-1.82.0-src.tar.xz
12000cf385342aa4ee085a574483d0c6d1eadf43 SOURCES/wasi-libc-b9ef79d7dbd47c6c5bafdae760823467c2f60b70.tar.gz

@ -0,0 +1,147 @@
From c15469a7fec811d1a4f69ff26e18c6f383df41d2 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Fri, 6 Sep 2024 09:21:33 -0700
Subject: [PATCH] Fix enabling wasm-component-ld to match other tools
It was [pointed out recently][comment] that enabling `wasm-component-ld`
as a host tool is different from other host tools. This commit refactors
the logic to match by deduplicating selection of when to build other
tools and then using the same logic for `wasm-component-ld`.
[comment]: https://github.com/rust-lang/rust/pull/127866#issuecomment-2333434720
---
src/bootstrap/src/core/build_steps/compile.rs | 2 +-
src/bootstrap/src/core/build_steps/dist.rs | 2 +-
src/bootstrap/src/core/build_steps/tool.rs | 38 +++----------------
src/bootstrap/src/lib.rs | 17 +++++----
4 files changed, 17 insertions(+), 42 deletions(-)
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 1936c91ef83c..102c9fd25543 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -1912,7 +1912,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
// delegates to the `rust-lld` binary for linking and then runs
// logic to create the final binary. This is used by the
// `wasm32-wasip2` target of Rust.
- if builder.build_wasm_component_ld() {
+ if builder.tool_enabled("wasm-component-ld") {
let wasm_component_ld_exe =
builder.ensure(crate::core::build_steps::tool::WasmComponentLd {
compiler: build_compiler,
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index 4957de2e1b79..ccb5656d6716 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -473,7 +473,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
);
}
}
- if builder.build_wasm_component_ld() {
+ if builder.tool_enabled("wasm-component-ld") {
let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin");
let ld = exe("wasm-component-ld", compiler.host);
builder.copy_link(&src_dir.join(&ld), &dst_dir.join(&ld));
diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs
index 3a1eb43b801f..3c2d791c2090 100644
--- a/src/bootstrap/src/core/build_steps/tool.rs
+++ b/src/bootstrap/src/core/build_steps/tool.rs
@@ -693,14 +693,7 @@ impl Step for Cargo {
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
- run.path("src/tools/cargo").default_condition(
- builder.config.extended
- && builder.config.tools.as_ref().map_or(
- true,
- // If `tools` is set, search list for this tool.
- |tools| tools.iter().any(|tool| tool == "cargo"),
- ),
- )
+ run.path("src/tools/cargo").default_condition(builder.tool_enabled("cargo"))
}
fn make_run(run: RunConfig<'_>) {
@@ -772,14 +765,7 @@ impl Step for RustAnalyzer {
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
- run.path("src/tools/rust-analyzer").default_condition(
- builder.config.extended
- && builder
- .config
- .tools
- .as_ref()
- .map_or(true, |tools| tools.iter().any(|tool| tool == "rust-analyzer")),
- )
+ run.path("src/tools/rust-analyzer").default_condition(builder.tool_enabled("rust-analyzer"))
}
fn make_run(run: RunConfig<'_>) {
@@ -821,12 +807,8 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/tools/rust-analyzer")
.path("src/tools/rust-analyzer/crates/proc-macro-srv-cli")
.default_condition(
- builder.config.extended
- && builder.config.tools.as_ref().map_or(true, |tools| {
- tools.iter().any(|tool| {
- tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv"
- })
- }),
+ builder.tool_enabled("rust-analyzer")
+ || builder.tool_enabled("rust-analyzer-proc-macro-srv"),
)
}
@@ -874,16 +856,8 @@ impl Step for LlvmBitcodeLinker {
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
- run.path("src/tools/llvm-bitcode-linker").default_condition(
- builder.config.extended
- && builder
- .config
- .tools
- .as_ref()
- .map_or(builder.build.unstable_features(), |tools| {
- tools.iter().any(|tool| tool == "llvm-bitcode-linker")
- }),
- )
+ run.path("src/tools/llvm-bitcode-linker")
+ .default_condition(builder.tool_enabled("llvm-bitcode-linker"))
}
fn make_run(run: RunConfig<'_>) {
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index c76ce3409562..780024e307ed 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1407,16 +1407,17 @@ fn default_wasi_runner(&self) -> Option<String> {
None
}
- /// Returns whether it's requested that `wasm-component-ld` is built as part
- /// of the sysroot. This is done either with the `extended` key in
- /// `config.toml` or with the `tools` set.
- fn build_wasm_component_ld(&self) -> bool {
- if self.config.extended {
- return true;
+ /// Returns whether the specified tool is configured as part of this build.
+ ///
+ /// This requires that both the `extended` key is set and the `tools` key is
+ /// either unset or specifically contains the specified tool.
+ fn tool_enabled(&self, tool: &str) -> bool {
+ if !self.config.extended {
+ return false;
}
match &self.config.tools {
- Some(set) => set.contains("wasm-component-ld"),
- None => false,
+ Some(set) => set.contains(tool),
+ None => true,
}
}
--
2.46.0

@ -1,234 +0,0 @@
From f46057bf1cc0dc24a0ecd7d87c9c93872e685253 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 27 Sep 2024 15:53:26 -0700
Subject: [PATCH] Only add an automatic SONAME for Rust dylibs
---
compiler/rustc_codegen_ssa/src/back/link.rs | 2 +-
compiler/rustc_codegen_ssa/src/back/linker.rs | 83 +++++++++++++++----
tests/run-make/dylib-soname/rmake.rs | 16 ++--
3 files changed, 80 insertions(+), 21 deletions(-)
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 80e8111516ee..a23cc5129261 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -2490,7 +2490,7 @@ fn add_order_independent_options(
}
}
- cmd.set_output_kind(link_output_kind, out_filename);
+ cmd.set_output_kind(link_output_kind, crate_type, out_filename);
add_relro_args(cmd, sess);
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
index a73ec83ee62c..3f3d305da014 100644
--- a/compiler/rustc_codegen_ssa/src/back/linker.rs
+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -275,7 +275,12 @@ pub(crate) trait Linker {
fn is_cc(&self) -> bool {
false
}
- fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path);
+ fn set_output_kind(
+ &mut self,
+ output_kind: LinkOutputKind,
+ crate_type: CrateType,
+ out_filename: &Path,
+ );
fn link_dylib_by_name(&mut self, _name: &str, _verbatim: bool, _as_needed: bool) {
bug!("dylib linked with unsupported linker")
}
@@ -396,7 +401,7 @@ fn push_linker_plugin_lto_args(&mut self, plugin_path: Option<&OsStr>) {
]);
}
- fn build_dylib(&mut self, out_filename: &Path) {
+ fn build_dylib(&mut self, crate_type: CrateType, out_filename: &Path) {
// On mac we need to tell the linker to let this library be rpathed
if self.sess.target.is_like_osx {
if !self.is_ld {
@@ -427,7 +432,7 @@ fn build_dylib(&mut self, out_filename: &Path) {
let mut out_implib = OsString::from("--out-implib=");
out_implib.push(out_filename.with_file_name(implib_name));
self.link_arg(out_implib);
- } else {
+ } else if crate_type == CrateType::Dylib {
// When dylibs are linked by a full path this value will get into `DT_NEEDED`
// instead of the full path, so the library can be later found in some other
// location than that specific path.
@@ -474,7 +479,12 @@ fn is_cc(&self) -> bool {
!self.is_ld
}
- fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path) {
+ fn set_output_kind(
+ &mut self,
+ output_kind: LinkOutputKind,
+ crate_type: CrateType,
+ out_filename: &Path,
+ ) {
match output_kind {
LinkOutputKind::DynamicNoPicExe => {
if !self.is_ld && self.is_gnu {
@@ -509,10 +519,10 @@ fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path)
self.link_args(&["-static", "-pie", "--no-dynamic-linker", "-z", "text"]);
}
}
- LinkOutputKind::DynamicDylib => self.build_dylib(out_filename),
+ LinkOutputKind::DynamicDylib => self.build_dylib(crate_type, out_filename),
LinkOutputKind::StaticDylib => {
self.link_or_cc_arg("-static");
- self.build_dylib(out_filename);
+ self.build_dylib(crate_type, out_filename);
}
LinkOutputKind::WasiReactorExe => {
self.link_args(&["--entry", "_initialize"]);
@@ -866,7 +876,12 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path) {
+ fn set_output_kind(
+ &mut self,
+ output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ out_filename: &Path,
+ ) {
match output_kind {
LinkOutputKind::DynamicNoPicExe
| LinkOutputKind::DynamicPicExe
@@ -1124,7 +1139,13 @@ fn is_cc(&self) -> bool {
true
}
- fn set_output_kind(&mut self, _output_kind: LinkOutputKind, _out_filename: &Path) {}
+ fn set_output_kind(
+ &mut self,
+ _output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ _out_filename: &Path,
+ ) {
+ }
fn link_dylib_by_name(&mut self, name: &str, _verbatim: bool, _as_needed: bool) {
// Emscripten always links statically
@@ -1273,7 +1294,12 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, output_kind: LinkOutputKind, _out_filename: &Path) {
+ fn set_output_kind(
+ &mut self,
+ output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ _out_filename: &Path,
+ ) {
match output_kind {
LinkOutputKind::DynamicNoPicExe
| LinkOutputKind::DynamicPicExe
@@ -1422,7 +1448,13 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, _output_kind: LinkOutputKind, _out_filename: &Path) {}
+ fn set_output_kind(
+ &mut self,
+ _output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ _out_filename: &Path,
+ ) {
+ }
fn link_staticlib_by_name(&mut self, name: &str, _verbatim: bool, whole_archive: bool) {
self.hint_static();
@@ -1568,7 +1600,12 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path) {
+ fn set_output_kind(
+ &mut self,
+ output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ out_filename: &Path,
+ ) {
match output_kind {
LinkOutputKind::DynamicDylib => {
self.hint_dynamic();
@@ -1775,7 +1812,13 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, _output_kind: LinkOutputKind, _out_filename: &Path) {}
+ fn set_output_kind(
+ &mut self,
+ _output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ _out_filename: &Path,
+ ) {
+ }
fn link_staticlib_by_name(&mut self, _name: &str, _verbatim: bool, _whole_archive: bool) {
panic!("staticlibs not supported")
@@ -1841,7 +1884,13 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, _output_kind: LinkOutputKind, _out_filename: &Path) {}
+ fn set_output_kind(
+ &mut self,
+ _output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ _out_filename: &Path,
+ ) {
+ }
fn link_staticlib_by_name(&mut self, _name: &str, _verbatim: bool, _whole_archive: bool) {
panic!("staticlibs not supported")
@@ -1912,7 +1961,13 @@ fn cmd(&mut self) -> &mut Command {
&mut self.cmd
}
- fn set_output_kind(&mut self, _output_kind: LinkOutputKind, _out_filename: &Path) {}
+ fn set_output_kind(
+ &mut self,
+ _output_kind: LinkOutputKind,
+ _crate_type: CrateType,
+ _out_filename: &Path,
+ ) {
+ }
fn link_staticlib_by_name(&mut self, _name: &str, _verbatim: bool, _whole_archive: bool) {
panic!("staticlibs not supported")
diff --git a/tests/run-make/dylib-soname/rmake.rs b/tests/run-make/dylib-soname/rmake.rs
index cec0d4638424..714997cbc1a1 100644
--- a/tests/run-make/dylib-soname/rmake.rs
+++ b/tests/run-make/dylib-soname/rmake.rs
@@ -7,12 +7,16 @@
use run_make_support::{cmd, run_in_tmpdir, rustc};
fn main() {
+ let check = |ty: &str| {
+ rustc().crate_name("foo").crate_type(ty).input("foo.rs").run();
+ cmd("readelf").arg("-d").arg("libfoo.so").run()
+ };
run_in_tmpdir(|| {
- rustc().crate_name("foo").crate_type("dylib").input("foo.rs").run();
- cmd("readelf")
- .arg("-d")
- .arg("libfoo.so")
- .run()
- .assert_stdout_contains("Library soname: [libfoo.so]");
+ // Rust dylibs should get a relative SONAME
+ check("dylib").assert_stdout_contains("Library soname: [libfoo.so]");
+ });
+ run_in_tmpdir(|| {
+ // C dylibs should not implicitly get any SONAME
+ check("cdylib").assert_stdout_not_contains("Library soname:");
});
}
--
2.46.1

@ -1,4 +1,4 @@
From 937b23ef51b1d2f3d12adc9bd90dfd27936326dd Mon Sep 17 00:00:00 2001
From babdaf8354098399ec98c96eb3a3627664d6ba03 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 28 Sep 2023 18:14:28 -0700
Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained
@ -11,10 +11,10 @@ Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained
4 files changed, 22 insertions(+)
diff --git a/config.example.toml b/config.example.toml
index 26687bcfb370..381a23f9cead 100644
index f1dc32234ccf..82207f19d471 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -872,6 +872,11 @@
@@ -880,6 +880,11 @@
# argument as the test binary.
#runner = <none> (string)
@ -27,10 +27,10 @@ index 26687bcfb370..381a23f9cead 100644
# Distribution options
#
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 3e79acad1c4b..525b6e956405 100644
index edf18e2ebf33..d48d027f329c 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -357,6 +357,10 @@ fn copy_self_contained_objects(
@@ -367,6 +367,10 @@ fn copy_self_contained_objects(
compiler: &Compiler,
target: TargetSelection,
) -> Vec<(PathBuf, DependencyType)> {
@ -42,10 +42,10 @@ index 3e79acad1c4b..525b6e956405 100644
t!(fs::create_dir_all(&libdir_self_contained));
let mut target_deps = vec![];
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 9d5aa795c6c0..720dc53514d3 100644
index bdfee55d8d18..47fcd50e7e03 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -565,6 +565,7 @@ pub struct Target {
@@ -589,6 +589,7 @@ pub struct Target {
pub runner: Option<String>,
pub no_std: bool,
pub codegen_backends: Option<Vec<String>>,
@ -53,7 +53,7 @@ index 9d5aa795c6c0..720dc53514d3 100644
}
impl Target {
@@ -573,6 +574,9 @@ pub fn from_triple(triple: &str) -> Self {
@@ -597,6 +598,9 @@ pub fn from_triple(triple: &str) -> Self {
if triple.contains("-none") || triple.contains("nvptx") || triple.contains("switch") {
target.no_std = true;
}
@ -63,7 +63,7 @@ index 9d5aa795c6c0..720dc53514d3 100644
target
}
}
@@ -1140,6 +1144,7 @@ struct TomlTarget {
@@ -1165,6 +1169,7 @@ struct TomlTarget {
no_std: Option<bool> = "no-std",
codegen_backends: Option<Vec<String>> = "codegen-backends",
runner: Option<String> = "runner",
@ -71,7 +71,7 @@ index 9d5aa795c6c0..720dc53514d3 100644
}
}
@@ -1900,6 +1905,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
@@ -1967,6 +1972,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
if let Some(s) = cfg.no_std {
target.no_std = s;
}
@ -82,10 +82,10 @@ index 9d5aa795c6c0..720dc53514d3 100644
target.cxx = cfg.cxx.map(PathBuf::from);
target.ar = cfg.ar.map(PathBuf::from);
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index a8555b2c3673..70c41b51eb96 100644
index 82b640f54234..f724aba50241 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1361,6 +1361,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
@@ -1326,6 +1326,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
self.config.target_config.get(&target).map(|t| t.no_std)
}

@ -0,0 +1,163 @@
From 5d3e8210feabae1d80a9f21c18c9173b1fdc43ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?=
<39484203+jieyouxu@users.noreply.github.com>
Date: Thu, 17 Oct 2024 22:58:45 +0800
Subject: [PATCH] bootstrap: allow setting `--jobs` in config.toml
(cherry picked from commit 65458aed68fe6786068bab00e5a46d7ecdd2a072)
---
config.example.toml | 5 ++
src/bootstrap/src/core/config/config.rs | 5 +-
src/bootstrap/src/core/config/flags.rs | 3 +-
src/bootstrap/src/core/config/tests.rs | 58 +++++++++++++++++++++++
src/bootstrap/src/utils/change_tracker.rs | 5 ++
5 files changed, 73 insertions(+), 3 deletions(-)
diff --git a/config.example.toml b/config.example.toml
index f1dc32234ccf..40c7ac9f5023 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -401,6 +401,11 @@
# Specify the location of the Android NDK. Used when targeting Android.
#android-ndk = "/path/to/android-ndk-r26d"
+# Number of parallel jobs to be used for building and testing. If set to `0` or
+# omitted, it will be automatically determined. This is the `-j`/`--jobs` flag
+# passed to cargo invocations.
+#jobs = 0
+
# =============================================================================
# General install configuration options
# =============================================================================
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index bdfee55d8d18..c1e0f8c6b338 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -872,6 +872,7 @@ struct Build {
metrics: Option<bool> = "metrics",
android_ndk: Option<PathBuf> = "android-ndk",
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
+ jobs: Option<u32> = "jobs",
}
}
@@ -1256,7 +1257,6 @@ pub(crate) fn parse_inner(
config.rustc_error_format = flags.rustc_error_format;
config.json_output = flags.json_output;
config.on_fail = flags.on_fail;
- config.jobs = Some(threads_from_config(flags.jobs as u32));
config.cmd = flags.cmd;
config.incremental = flags.incremental;
config.dry_run = if flags.dry_run { DryRun::UserSelected } else { DryRun::Disabled };
@@ -1477,8 +1477,11 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
metrics: _,
android_ndk,
optimized_compiler_builtins,
+ jobs,
} = toml.build.unwrap_or_default();
+ config.jobs = Some(threads_from_config(flags.jobs.unwrap_or(jobs.unwrap_or(0))));
+
if let Some(file_build) = build {
config.build = TargetSelection::from_user(&file_build);
};
diff --git a/src/bootstrap/src/core/config/flags.rs b/src/bootstrap/src/core/config/flags.rs
index c3f174028149..7fdd5f8b8cae 100644
--- a/src/bootstrap/src/core/config/flags.rs
+++ b/src/bootstrap/src/core/config/flags.rs
@@ -110,11 +110,10 @@ pub struct Flags {
short,
long,
value_hint = clap::ValueHint::Other,
- default_value_t = std::thread::available_parallelism().map_or(1, std::num::NonZeroUsize::get),
value_name = "JOBS"
)]
/// number of jobs to run in parallel
- pub jobs: usize,
+ pub jobs: Option<u32>,
// This overrides the deny-warnings configuration option,
// which passes -Dwarnings to the compiler invocations.
#[arg(global = true, long)]
diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs
index 219c5a6ec914..bc49074fa316 100644
--- a/src/bootstrap/src/core/config/tests.rs
+++ b/src/bootstrap/src/core/config/tests.rs
@@ -317,3 +317,61 @@ fn order_of_clippy_rules() {
assert_eq!(expected, actual);
}
+
+#[test]
+fn parse_jobs() {
+ assert_eq!(parse("build.jobs = 1").jobs, Some(1));
+}
+
+#[test]
+fn jobs_precedence() {
+ // `--jobs` should take precedence over using `--set build.jobs`.
+
+ let config = Config::parse_inner(
+ Flags::parse(&[
+ "check".to_owned(),
+ "--config=/does/not/exist".to_owned(),
+ "--jobs=67890".to_owned(),
+ "--set=build.jobs=12345".to_owned(),
+ ]),
+ |&_| toml::from_str(""),
+ );
+ assert_eq!(config.jobs, Some(67890));
+
+ // `--set build.jobs` should take precedence over `config.toml`.
+ let config = Config::parse_inner(
+ Flags::parse(&[
+ "check".to_owned(),
+ "--config=/does/not/exist".to_owned(),
+ "--set=build.jobs=12345".to_owned(),
+ ]),
+ |&_| {
+ toml::from_str(
+ r#"
+ [build]
+ jobs = 67890
+ "#,
+ )
+ },
+ );
+ assert_eq!(config.jobs, Some(12345));
+
+ // `--jobs` > `--set build.jobs` > `config.toml`
+ let config = Config::parse_inner(
+ Flags::parse(&[
+ "check".to_owned(),
+ "--jobs=123".to_owned(),
+ "--config=/does/not/exist".to_owned(),
+ "--set=build.jobs=456".to_owned(),
+ ]),
+ |&_| {
+ toml::from_str(
+ r#"
+ [build]
+ jobs = 789
+ "#,
+ )
+ },
+ );
+ assert_eq!(config.jobs, Some(123));
+}
diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs
index 51a25104e4cf..1f6a1064a5dc 100644
--- a/src/bootstrap/src/utils/change_tracker.rs
+++ b/src/bootstrap/src/utils/change_tracker.rs
@@ -235,4 +235,9 @@ pub fn human_readable_changes(changes: &[ChangeInfo]) -> String {
severity: ChangeSeverity::Info,
summary: "The `build.profiler` option now tries to use source code from `download-ci-llvm` if possible, instead of checking out the `src/llvm-project` submodule.",
},
+ ChangeInfo {
+ change_id: 131838,
+ severity: ChangeSeverity::Info,
+ summary: "Allow setting `--jobs` in config.toml with `build.jobs`.",
+ },
];
--
2.47.0

@ -1,103 +0,0 @@
From c41f254ad192a4ab402b40f8bdad169a8163140a Mon Sep 17 00:00:00 2001
From: onur-ozkan <work@onurozkan.dev>
Date: Thu, 25 Jul 2024 15:59:25 +0300
Subject: [PATCH] handle no_std targets on std builds
This change unifies the `Step::run_make` logic and improves it by skipping
std specific crates for no_std targets.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 6e247195c644aa924a10c98cc8eb3a28e1a87929)
---
src/bootstrap/src/core/build_steps/check.rs | 4 ++--
src/bootstrap/src/core/build_steps/clippy.rs | 3 ++-
src/bootstrap/src/core/build_steps/compile.rs | 23 +++++++++++++++----
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs
index 8235d4634b75..bbad3f179ac7 100644
--- a/src/bootstrap/src/core/build_steps/check.rs
+++ b/src/bootstrap/src/core/build_steps/check.rs
@@ -1,7 +1,7 @@
//! Implementation of compiling the compiler and standard library, in "check"-based modes.
use crate::core::build_steps::compile::{
- add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo,
+ add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo, std_crates_for_run_make,
};
use crate::core::build_steps::tool::{prepare_tool_cargo, SourceType};
use crate::core::builder::{
@@ -47,7 +47,7 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
}
fn make_run(run: RunConfig<'_>) {
- let crates = run.make_run_crates(Alias::Library);
+ let crates = std_crates_for_run_make(&run);
run.builder.ensure(Std { target: run.target, crates });
}
diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs
index 40a2112b1925..a3ab094d799d 100644
--- a/src/bootstrap/src/core/build_steps/clippy.rs
+++ b/src/bootstrap/src/core/build_steps/clippy.rs
@@ -4,6 +4,7 @@
use crate::builder::Builder;
use crate::builder::ShouldRun;
+use crate::core::build_steps::compile::std_crates_for_run_make;
use crate::core::builder;
use crate::core::builder::crate_description;
use crate::core::builder::Alias;
@@ -122,7 +123,7 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
}
fn make_run(run: RunConfig<'_>) {
- let crates = run.make_run_crates(Alias::Library);
+ let crates = std_crates_for_run_make(&run);
run.builder.ensure(Std { target: run.target, crates });
}
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 525b6e956405..19c8cbc54080 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -127,11 +127,7 @@ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
}
fn make_run(run: RunConfig<'_>) {
- // If the paths include "library", build the entire standard library.
- let has_alias =
- run.paths.iter().any(|set| set.assert_single_path().path.ends_with("library"));
- let crates = if has_alias { Default::default() } else { run.cargo_crates_in_set() };
-
+ let crates = std_crates_for_run_make(&run);
run.builder.ensure(Std {
compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()),
target: run.target,
@@ -428,6 +424,23 @@ fn copy_self_contained_objects(
target_deps
}
+/// Resolves standard library crates for `Std::run_make` for any build kind (like check, build, clippy, etc.).
+pub fn std_crates_for_run_make(run: &RunConfig<'_>) -> Vec<String> {
+ let has_alias = run.paths.iter().any(|set| set.assert_single_path().path.ends_with("library"));
+ let target_is_no_std = run.builder.no_std(run.target).unwrap_or(false);
+
+ // For no_std targets, do not add any additional crates to the compilation other than what `compile::std_cargo` already adds for no_std targets.
+ if target_is_no_std {
+ vec![]
+ }
+ // If the paths include "library", build the entire standard library.
+ else if has_alias {
+ run.make_run_crates(builder::Alias::Library)
+ } else {
+ run.cargo_crates_in_set()
+ }
+}
+
/// Configure cargo to compile the standard library, adding appropriate env vars
/// and such.
pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, cargo: &mut Cargo) {
--
2.46.0

@ -1,19 +1,19 @@
From 348b03695d916ab23a9d66c4ceed2ecbecfc68e7 Mon Sep 17 00:00:00 2001
From 3fdce19416e80a48c5b2b77b2cdec697d0b5e225 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 28 Sep 2023 18:18:16 -0700
Subject: [PATCH 2/2] set an external library path for wasm32-wasi
---
compiler/rustc_codegen_ssa/src/back/link.rs | 9 +++++++++
compiler/rustc_target/src/spec/mod.rs | 4 ++++
compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs | 7 ++++---
3 files changed, 17 insertions(+), 3 deletions(-)
compiler/rustc_codegen_ssa/src/back/link.rs | 10 ++++++++++
compiler/rustc_target/src/spec/mod.rs | 4 ++++
.../rustc_target/src/spec/targets/wasm32_wasip1.rs | 7 ++++---
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 8c582fac0d82..169d86cd6224 100644
index e8143b9a5f38..5a928a18b3ea 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -1586,6 +1586,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat
@@ -1621,6 +1621,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat
return file_path;
}
}
@ -23,13 +23,14 @@ index 8c582fac0d82..169d86cd6224 100644
+ return file_path;
+ }
+ }
for search_path in fs.search_paths() {
for search_path in sess.target_filesearch(PathKind::Native).search_paths() {
let file_path = search_path.dir.join(name);
if file_path.exists() {
@@ -2076,6 +2082,9 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained:
let lib_path = sess.target_filesearch(PathKind::All).get_self_contained_lib_path();
cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));
}
@@ -2123,6 +2129,10 @@ fn add_library_search_dirs(
ControlFlow::<()>::Continue(())
},
);
+
+ if let Some(lib_path) = &sess.target.options.external_lib_path {
+ cmd.include_path(Path::new(lib_path.as_ref()));
+ }
@ -37,10 +38,10 @@ index 8c582fac0d82..169d86cd6224 100644
/// Add options making relocation sections in the produced ELF files read-only
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 607eeac7ccdc..63070622502e 100644
index d5f227a84a4c..54c22c8ebed6 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -2033,6 +2033,7 @@ pub struct TargetOptions {
@@ -2053,6 +2053,7 @@ pub struct TargetOptions {
/// Objects to link before and after all other object code.
pub pre_link_objects: CrtObjects,
pub post_link_objects: CrtObjects,
@ -48,7 +49,7 @@ index 607eeac7ccdc..63070622502e 100644
/// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled.
pub pre_link_objects_self_contained: CrtObjects,
pub post_link_objects_self_contained: CrtObjects,
@@ -2520,6 +2521,7 @@ fn default() -> TargetOptions {
@@ -2540,6 +2541,7 @@ fn default() -> TargetOptions {
relro_level: RelroLevel::None,
pre_link_objects: Default::default(),
post_link_objects: Default::default(),
@ -56,7 +57,7 @@ index 607eeac7ccdc..63070622502e 100644
pre_link_objects_self_contained: Default::default(),
post_link_objects_self_contained: Default::default(),
link_self_contained: LinkSelfContainedDefault::False,
@@ -3202,6 +3204,7 @@ macro_rules! key {
@@ -3221,6 +3223,7 @@ macro_rules! key {
key!(linker_is_gnu_json = "linker-is-gnu", bool);
key!(pre_link_objects = "pre-link-objects", link_objects);
key!(post_link_objects = "post-link-objects", link_objects);
@ -64,7 +65,7 @@ index 607eeac7ccdc..63070622502e 100644
key!(pre_link_objects_self_contained = "pre-link-objects-fallback", link_objects);
key!(post_link_objects_self_contained = "post-link-objects-fallback", link_objects);
// Deserializes the backwards-compatible variants of `-Clink-self-contained`
@@ -3464,6 +3467,7 @@ macro_rules! target_option_val {
@@ -3482,6 +3485,7 @@ macro_rules! target_option_val {
target_option_val!(linker_is_gnu_json, "linker-is-gnu");
target_option_val!(pre_link_objects);
target_option_val!(post_link_objects);
@ -73,10 +74,10 @@ index 607eeac7ccdc..63070622502e 100644
target_option_val!(post_link_objects_self_contained, "post-link-objects-fallback");
target_option_val!(link_args - pre_link_args_json, "pre-link-args");
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
index a8e7f22c0689..55949557d6bb 100644
index 29e6dff2068f..dbe021ef064c 100644
--- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
+++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
@@ -21,11 +21,12 @@ pub fn target() -> Target {
@@ -19,11 +19,12 @@ pub fn target() -> Target {
options.env = "p1".into();
options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasi"]);

@ -1,560 +0,0 @@
From 83f32e189ad59109a162a61d7844545c4eda48e7 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Tue, 9 Jul 2024 09:34:59 +0200
Subject: [PATCH 1/4] Update to LLVM 19
(cherry picked from commit 579ab05e76f1434f3074195c7291895f1257bc97)
---
.gitmodules | 2 +-
src/llvm-project | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitmodules b/.gitmodules
index 9ad207a0d522..b5250d493864 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -33,7 +33,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
- branch = rustc/18.1-2024-05-19
+ branch = rustc/19.1-2024-07-30
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
--
2.46.1
From 3bdb9f55ed61e1984e9b2ac23c328a4792e41b6e Mon Sep 17 00:00:00 2001
From: Krasimir Georgiev <krasimir@google.com>
Date: Mon, 17 Jun 2024 09:35:38 +0000
Subject: [PATCH 2/4] Disable MC/DC tests on LLVM 19
Disable the tests and generate an error if MC/DC is used on LLVM 19.
The support will be ported separately, as it is substantially
different on LLVM 19, and there are no plans to support both
versions.
(cherry picked from commit 00bfd702dc8c3b760b4f965fd059a5f1db8bb2b1)
---
compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 2 +-
tests/coverage/mcdc/condition-limit.rs | 1 +
tests/coverage/mcdc/if.rs | 1 +
tests/coverage/mcdc/inlined_expressions.rs | 1 +
tests/coverage/mcdc/nested_if.rs | 1 +
tests/coverage/mcdc/non_control_flow.rs | 1 +
6 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 14757b27a375..493cfbcec2cf 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1557,7 +1557,7 @@ LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModuleRef M) {
extern "C" LLVMValueRef
LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) {
-#if LLVM_VERSION_GE(18, 0)
+#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0)
return wrap(llvm::Intrinsic::getDeclaration(
unwrap(M), llvm::Intrinsic::instrprof_mcdc_condbitmap_update));
#else
diff --git a/tests/coverage/mcdc/condition-limit.rs b/tests/coverage/mcdc/condition-limit.rs
index 571c600ebd09..2ff46b11a168 100644
--- a/tests/coverage/mcdc/condition-limit.rs
+++ b/tests/coverage/mcdc/condition-limit.rs
@@ -1,6 +1,7 @@
#![feature(coverage_attribute)]
//@ edition: 2021
//@ min-llvm-version: 18
+//@ ignore-llvm-version: 19 - 99
//@ compile-flags: -Zcoverage-options=mcdc
//@ llvm-cov-flags: --show-branches=count --show-mcdc
diff --git a/tests/coverage/mcdc/if.rs b/tests/coverage/mcdc/if.rs
index d8e6b61a9d59..6f589659a3d7 100644
--- a/tests/coverage/mcdc/if.rs
+++ b/tests/coverage/mcdc/if.rs
@@ -1,6 +1,7 @@
#![feature(coverage_attribute)]
//@ edition: 2021
//@ min-llvm-version: 18
+//@ ignore-llvm-version: 19 - 99
//@ compile-flags: -Zcoverage-options=mcdc
//@ llvm-cov-flags: --show-branches=count --show-mcdc
diff --git a/tests/coverage/mcdc/inlined_expressions.rs b/tests/coverage/mcdc/inlined_expressions.rs
index 65f7ee66f399..fc1e4dae37c7 100644
--- a/tests/coverage/mcdc/inlined_expressions.rs
+++ b/tests/coverage/mcdc/inlined_expressions.rs
@@ -1,6 +1,7 @@
#![feature(coverage_attribute)]
//@ edition: 2021
//@ min-llvm-version: 18
+//@ ignore-llvm-version: 19 - 99
//@ compile-flags: -Zcoverage-options=mcdc -Copt-level=z -Cllvm-args=--inline-threshold=0
//@ llvm-cov-flags: --show-branches=count --show-mcdc
diff --git a/tests/coverage/mcdc/nested_if.rs b/tests/coverage/mcdc/nested_if.rs
index f5068b5dcc23..f9ce7a0bc254 100644
--- a/tests/coverage/mcdc/nested_if.rs
+++ b/tests/coverage/mcdc/nested_if.rs
@@ -1,6 +1,7 @@
#![feature(coverage_attribute)]
//@ edition: 2021
//@ min-llvm-version: 18
+//@ ignore-llvm-version: 19 - 99
//@ compile-flags: -Zcoverage-options=mcdc
//@ llvm-cov-flags: --show-branches=count --show-mcdc
diff --git a/tests/coverage/mcdc/non_control_flow.rs b/tests/coverage/mcdc/non_control_flow.rs
index 77e64e6625b2..633d381a1aaf 100644
--- a/tests/coverage/mcdc/non_control_flow.rs
+++ b/tests/coverage/mcdc/non_control_flow.rs
@@ -1,6 +1,7 @@
#![feature(coverage_attribute)]
//@ edition: 2021
//@ min-llvm-version: 18
+//@ ignore-llvm-version: 19 - 99
//@ compile-flags: -Zcoverage-options=mcdc
//@ llvm-cov-flags: --show-branches=count --show-mcdc
--
2.46.1
From d9476247415418ec6cc3478636ada38cf28feb69 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Wed, 24 Jul 2024 16:03:36 +0200
Subject: [PATCH 3/4] Crash test for issue 121444 has been fixed
(cherry picked from commit b960390548b373bd80b5d9fe590ae3b577e8e8f2)
---
tests/{crashes/121444.rs => ui/abi/large-byval-align.rs} | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
rename tests/{crashes/121444.rs => ui/abi/large-byval-align.rs} (68%)
diff --git a/tests/crashes/121444.rs b/tests/ui/abi/large-byval-align.rs
similarity index 68%
rename from tests/crashes/121444.rs
rename to tests/ui/abi/large-byval-align.rs
index a6373a58c426..e39170df72b4 100644
--- a/tests/crashes/121444.rs
+++ b/tests/ui/abi/large-byval-align.rs
@@ -1,11 +1,13 @@
-//@ known-bug: #121444
//@ compile-flags: -Copt-level=0
-//@ edition:2021
//@ only-x86_64
//@ ignore-windows
+//@ min-llvm-version: 19
+//@ build-pass
+
#[repr(align(536870912))]
pub struct A(i64);
+#[allow(improper_ctypes_definitions)]
pub extern "C" fn foo(x: A) {}
fn main() {
--
2.46.1
From 05f84c2aa8853263b650b21637f689255413b923 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 30 Jul 2024 18:25:05 -0700
Subject: [PATCH 4/4] Bless coverage/mcdc for line number changes
(cherry picked from commit 33a36ea43851a767d8182938161b0dad4f9ae68c)
---
tests/coverage/mcdc/condition-limit.cov-map | 8 +++---
tests/coverage/mcdc/if.cov-map | 28 +++++++++----------
.../coverage/mcdc/inlined_expressions.cov-map | 4 +--
tests/coverage/mcdc/nested_if.cov-map | 16 +++++------
tests/coverage/mcdc/non_control_flow.cov-map | 28 +++++++++----------
5 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/tests/coverage/mcdc/condition-limit.cov-map b/tests/coverage/mcdc/condition-limit.cov-map
index b4447a33691a..b565353572a7 100644
--- a/tests/coverage/mcdc/condition-limit.cov-map
+++ b/tests/coverage/mcdc/condition-limit.cov-map
@@ -1,5 +1,5 @@
Function name: condition_limit::bad
-Raw bytes (204): 0x[01, 01, 2c, 01, 05, 05, 1d, 05, 1d, 7a, 19, 05, 1d, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 21, 9b, 01, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 11, 01, 14, 01, 03, 09, 20, 05, 02, 03, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 7a, 1d, 00, 0d, 00, 0e, 7a, 00, 12, 00, 13, 20, 76, 19, 00, 12, 00, 13, 76, 00, 17, 00, 18, 20, 72, 15, 00, 17, 00, 18, 72, 00, 1c, 00, 1d, 20, 6e, 11, 00, 1c, 00, 1d, 6e, 00, 21, 00, 22, 20, 6a, 0d, 00, 21, 00, 22, 6a, 00, 26, 00, 27, 20, 21, 09, 00, 26, 00, 27, 21, 00, 28, 02, 06, 9b, 01, 02, 06, 00, 07, 97, 01, 01, 01, 00, 02]
+Raw bytes (204): 0x[01, 01, 2c, 01, 05, 05, 1d, 05, 1d, 7a, 19, 05, 1d, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 21, 9b, 01, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 11, 01, 15, 01, 03, 09, 20, 05, 02, 03, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 7a, 1d, 00, 0d, 00, 0e, 7a, 00, 12, 00, 13, 20, 76, 19, 00, 12, 00, 13, 76, 00, 17, 00, 18, 20, 72, 15, 00, 17, 00, 18, 72, 00, 1c, 00, 1d, 20, 6e, 11, 00, 1c, 00, 1d, 6e, 00, 21, 00, 22, 20, 6a, 0d, 00, 21, 00, 22, 6a, 00, 26, 00, 27, 20, 21, 09, 00, 26, 00, 27, 21, 00, 28, 02, 06, 9b, 01, 02, 06, 00, 07, 97, 01, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 44
@@ -48,7 +48,7 @@ Number of expressions: 44
- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(4)
- expression 43 operands: lhs = Counter(2), rhs = Counter(3)
Number of file 0 mappings: 17
-- Code(Counter(0)) at (prev + 20, 1) to (start + 3, 9)
+- Code(Counter(0)) at (prev + 21, 1) to (start + 3, 9)
- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 3, 8) to (start + 0, 9)
true = c1
false = (c0 - c1)
@@ -88,7 +88,7 @@ Number of file 0 mappings: 17
= (c8 + ((((((c2 + c3) + c4) + c5) + c6) + c7) + (c0 - c1)))
Function name: condition_limit::good
-Raw bytes (180): 0x[01, 01, 20, 01, 05, 05, 19, 05, 19, 52, 15, 05, 19, 52, 15, 05, 19, 4e, 11, 52, 15, 05, 19, 4e, 11, 52, 15, 05, 19, 4a, 0d, 4e, 11, 52, 15, 05, 19, 4a, 0d, 4e, 11, 52, 15, 05, 19, 73, 02, 77, 19, 7b, 15, 7f, 11, 09, 0d, 1d, 6f, 73, 02, 77, 19, 7b, 15, 7f, 11, 09, 0d, 10, 01, 0c, 01, 03, 09, 28, 00, 06, 03, 08, 00, 22, 30, 05, 02, 01, 06, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 52, 19, 06, 05, 00, 00, 0d, 00, 0e, 52, 00, 12, 00, 13, 30, 4e, 15, 05, 04, 00, 00, 12, 00, 13, 4e, 00, 17, 00, 18, 30, 4a, 11, 04, 03, 00, 00, 17, 00, 18, 4a, 00, 1c, 00, 1d, 30, 46, 0d, 03, 02, 00, 00, 1c, 00, 1d, 46, 00, 21, 00, 22, 30, 1d, 09, 02, 00, 00, 00, 21, 00, 22, 1d, 00, 23, 02, 06, 6f, 02, 06, 00, 07, 6b, 01, 01, 00, 02]
+Raw bytes (180): 0x[01, 01, 20, 01, 05, 05, 19, 05, 19, 52, 15, 05, 19, 52, 15, 05, 19, 4e, 11, 52, 15, 05, 19, 4e, 11, 52, 15, 05, 19, 4a, 0d, 4e, 11, 52, 15, 05, 19, 4a, 0d, 4e, 11, 52, 15, 05, 19, 73, 02, 77, 19, 7b, 15, 7f, 11, 09, 0d, 1d, 6f, 73, 02, 77, 19, 7b, 15, 7f, 11, 09, 0d, 10, 01, 0d, 01, 03, 09, 28, 00, 06, 03, 08, 00, 22, 30, 05, 02, 01, 06, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 52, 19, 06, 05, 00, 00, 0d, 00, 0e, 52, 00, 12, 00, 13, 30, 4e, 15, 05, 04, 00, 00, 12, 00, 13, 4e, 00, 17, 00, 18, 30, 4a, 11, 04, 03, 00, 00, 17, 00, 18, 4a, 00, 1c, 00, 1d, 30, 46, 0d, 03, 02, 00, 00, 1c, 00, 1d, 46, 00, 21, 00, 22, 30, 1d, 09, 02, 00, 00, 00, 21, 00, 22, 1d, 00, 23, 02, 06, 6f, 02, 06, 00, 07, 6b, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 32
@@ -125,7 +125,7 @@ Number of expressions: 32
- expression 30 operands: lhs = Expression(31, Add), rhs = Counter(4)
- expression 31 operands: lhs = Counter(2), rhs = Counter(3)
Number of file 0 mappings: 16
-- Code(Counter(0)) at (prev + 12, 1) to (start + 3, 9)
+- Code(Counter(0)) at (prev + 13, 1) to (start + 3, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 6 } at (prev + 3, 8) to (start + 0, 34)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 6, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
diff --git a/tests/coverage/mcdc/if.cov-map b/tests/coverage/mcdc/if.cov-map
index 9a7d15f700df..ea8dedb0ac36 100644
--- a/tests/coverage/mcdc/if.cov-map
+++ b/tests/coverage/mcdc/if.cov-map
@@ -1,5 +1,5 @@
Function name: if::mcdc_check_a
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 0f, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 10, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
@@ -8,7 +8,7 @@ Number of expressions: 4
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 16, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -24,7 +24,7 @@ Number of file 0 mappings: 8
= (c3 + (c2 + (c0 - c1)))
Function name: if::mcdc_check_b
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 17, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 18, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
@@ -33,7 +33,7 @@ Number of expressions: 4
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 23, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 24, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -49,7 +49,7 @@ Number of file 0 mappings: 8
= (c3 + (c2 + (c0 - c1)))
Function name: if::mcdc_check_both
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 1f, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 20, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
@@ -58,7 +58,7 @@ Number of expressions: 4
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 31, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 32, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -74,7 +74,7 @@ Number of file 0 mappings: 8
= (c3 + (c2 + (c0 - c1)))
Function name: if::mcdc_check_neither
-Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 07, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
+Raw bytes (64): 0x[01, 01, 04, 01, 05, 09, 02, 0d, 0f, 09, 02, 08, 01, 08, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 0e, 0d, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
@@ -83,7 +83,7 @@ Number of expressions: 4
- expression 2 operands: lhs = Counter(3), rhs = Expression(3, Add)
- expression 3 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 7, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 8, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -99,7 +99,7 @@ Number of file 0 mappings: 8
= (c3 + (c2 + (c0 - c1)))
Function name: if::mcdc_check_not_tree_decision
-Raw bytes (87): 0x[01, 01, 08, 01, 05, 02, 09, 05, 09, 0d, 1e, 02, 09, 11, 1b, 0d, 1e, 02, 09, 0a, 01, 31, 01, 03, 0a, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 1e, 03, 02, 00, 00, 0e, 00, 0f, 0b, 00, 14, 00, 15, 30, 11, 0d, 02, 00, 00, 00, 14, 00, 15, 11, 00, 16, 02, 06, 1b, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
+Raw bytes (87): 0x[01, 01, 08, 01, 05, 02, 09, 05, 09, 0d, 1e, 02, 09, 11, 1b, 0d, 1e, 02, 09, 0a, 01, 32, 01, 03, 0a, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 1e, 03, 02, 00, 00, 0e, 00, 0f, 0b, 00, 14, 00, 15, 30, 11, 0d, 02, 00, 00, 00, 14, 00, 15, 11, 00, 16, 02, 06, 1b, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 8
@@ -112,7 +112,7 @@ Number of expressions: 8
- expression 6 operands: lhs = Counter(3), rhs = Expression(7, Sub)
- expression 7 operands: lhs = Expression(0, Sub), rhs = Counter(2)
Number of file 0 mappings: 10
-- Code(Counter(0)) at (prev + 49, 1) to (start + 3, 10)
+- Code(Counter(0)) at (prev + 50, 1) to (start + 3, 10)
- MCDCDecision { bitmap_idx: 0, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 3 } at (prev + 0, 9) to (start + 0, 10)
true = c1
@@ -134,7 +134,7 @@ Number of file 0 mappings: 10
= (c4 + (c3 + ((c0 - c1) - c2)))
Function name: if::mcdc_check_tree_decision
-Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 0d, 05, 0d, 0d, 11, 09, 02, 1b, 1f, 0d, 11, 09, 02, 0a, 01, 27, 01, 03, 09, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 0d, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 11, 09, 03, 00, 00, 00, 13, 00, 14, 1b, 00, 16, 02, 06, 1f, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
+Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 0d, 05, 0d, 0d, 11, 09, 02, 1b, 1f, 0d, 11, 09, 02, 0a, 01, 28, 01, 03, 09, 28, 00, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 0d, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 11, 09, 03, 00, 00, 00, 13, 00, 14, 1b, 00, 16, 02, 06, 1f, 02, 0c, 02, 06, 17, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 8
@@ -147,7 +147,7 @@ Number of expressions: 8
- expression 6 operands: lhs = Counter(3), rhs = Counter(4)
- expression 7 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 10
-- Code(Counter(0)) at (prev + 39, 1) to (start + 3, 9)
+- Code(Counter(0)) at (prev + 40, 1) to (start + 3, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -169,7 +169,7 @@ Number of file 0 mappings: 10
= ((c3 + c4) + (c2 + (c0 - c1)))
Function name: if::mcdc_nested_if
-Raw bytes (124): 0x[01, 01, 0d, 01, 05, 02, 09, 05, 09, 1b, 15, 05, 09, 1b, 15, 05, 09, 11, 15, 02, 09, 2b, 32, 0d, 2f, 11, 15, 02, 09, 0e, 01, 3b, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 32, 02, 00, 00, 00, 0d, 00, 0e, 1b, 01, 09, 01, 0d, 28, 01, 02, 01, 0c, 00, 12, 30, 16, 15, 01, 02, 00, 00, 0c, 00, 0d, 16, 00, 11, 00, 12, 30, 0d, 11, 02, 00, 00, 00, 11, 00, 12, 0d, 00, 13, 02, 0a, 2f, 02, 0a, 00, 0b, 32, 01, 0c, 02, 06, 27, 03, 01, 00, 02]
+Raw bytes (124): 0x[01, 01, 0d, 01, 05, 02, 09, 05, 09, 1b, 15, 05, 09, 1b, 15, 05, 09, 11, 15, 02, 09, 2b, 32, 0d, 2f, 11, 15, 02, 09, 0e, 01, 3c, 01, 01, 09, 28, 00, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 32, 02, 00, 00, 00, 0d, 00, 0e, 1b, 01, 09, 01, 0d, 28, 01, 02, 01, 0c, 00, 12, 30, 16, 15, 01, 02, 00, 00, 0c, 00, 0d, 16, 00, 11, 00, 12, 30, 0d, 11, 02, 00, 00, 00, 11, 00, 12, 0d, 00, 13, 02, 0a, 2f, 02, 0a, 00, 0b, 32, 01, 0c, 02, 06, 27, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 13
@@ -187,7 +187,7 @@ Number of expressions: 13
- expression 11 operands: lhs = Counter(4), rhs = Counter(5)
- expression 12 operands: lhs = Expression(0, Sub), rhs = Counter(2)
Number of file 0 mappings: 14
-- Code(Counter(0)) at (prev + 59, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 60, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 8) to (start + 0, 9)
true = c1
diff --git a/tests/coverage/mcdc/inlined_expressions.cov-map b/tests/coverage/mcdc/inlined_expressions.cov-map
index 09b7291c9649..8bb488c0dc07 100644
--- a/tests/coverage/mcdc/inlined_expressions.cov-map
+++ b/tests/coverage/mcdc/inlined_expressions.cov-map
@@ -1,5 +1,5 @@
Function name: inlined_expressions::inlined_instance
-Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 08, 01, 01, 06, 28, 00, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 0d, 02, 00, 00, 00, 0a, 00, 0b, 07, 01, 01, 00, 02]
+Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 09, 01, 01, 06, 28, 00, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 0d, 02, 00, 00, 00, 0a, 00, 0b, 07, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 3
@@ -7,7 +7,7 @@ Number of expressions: 3
- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(0, Sub)
- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 8, 1) to (start + 1, 6)
+- Code(Counter(0)) at (prev + 9, 1) to (start + 1, 6)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 5) to (start + 0, 11)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 5) to (start + 0, 6)
true = c1
diff --git a/tests/coverage/mcdc/nested_if.cov-map b/tests/coverage/mcdc/nested_if.cov-map
index adeb6cbc1fb8..0bd2aef814c2 100644
--- a/tests/coverage/mcdc/nested_if.cov-map
+++ b/tests/coverage/mcdc/nested_if.cov-map
@@ -1,5 +1,5 @@
Function name: nested_if::doubly_nested_if_in_condition
-Raw bytes (168): 0x[01, 01, 0e, 01, 05, 05, 11, 05, 11, 26, 19, 05, 11, 19, 1d, 19, 1d, 1d, 22, 26, 19, 05, 11, 11, 15, 09, 02, 0d, 37, 09, 02, 14, 01, 0f, 01, 01, 09, 28, 02, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 01, 02, 00, 10, 00, 36, 30, 11, 26, 01, 00, 02, 00, 10, 00, 11, 30, 15, 21, 02, 00, 00, 00, 15, 00, 36, 26, 00, 18, 00, 19, 28, 00, 02, 00, 18, 00, 1e, 30, 19, 22, 01, 02, 00, 00, 18, 00, 19, 19, 00, 1d, 00, 1e, 30, 1a, 1d, 02, 00, 00, 00, 1d, 00, 1e, 1a, 00, 21, 00, 25, 1f, 00, 2f, 00, 34, 2b, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 0d, 00, 4f, 02, 06, 37, 02, 0c, 02, 06, 33, 03, 01, 00, 02]
+Raw bytes (168): 0x[01, 01, 0e, 01, 05, 05, 11, 05, 11, 26, 19, 05, 11, 19, 1d, 19, 1d, 1d, 22, 26, 19, 05, 11, 11, 15, 09, 02, 0d, 37, 09, 02, 14, 01, 10, 01, 01, 09, 28, 02, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 01, 02, 00, 10, 00, 36, 30, 11, 26, 01, 00, 02, 00, 10, 00, 11, 30, 15, 21, 02, 00, 00, 00, 15, 00, 36, 26, 00, 18, 00, 19, 28, 00, 02, 00, 18, 00, 1e, 30, 19, 22, 01, 02, 00, 00, 18, 00, 19, 19, 00, 1d, 00, 1e, 30, 1a, 1d, 02, 00, 00, 00, 1d, 00, 1e, 1a, 00, 21, 00, 25, 1f, 00, 2f, 00, 34, 2b, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 0d, 00, 4f, 02, 06, 37, 02, 0c, 02, 06, 33, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 14
@@ -18,7 +18,7 @@ Number of expressions: 14
- expression 12 operands: lhs = Counter(3), rhs = Expression(13, Add)
- expression 13 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 20
-- Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 16, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 2, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 78)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -58,7 +58,7 @@ Number of file 0 mappings: 20
= (c3 + (c2 + (c0 - c1)))
Function name: nested_if::nested_if_in_condition
-Raw bytes (120): 0x[01, 01, 0b, 01, 05, 05, 11, 05, 11, 1e, 15, 05, 11, 11, 15, 1e, 15, 05, 11, 09, 02, 0d, 2b, 09, 02, 0e, 01, 07, 01, 01, 09, 28, 01, 02, 01, 08, 00, 2e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 2e, 05, 00, 10, 00, 11, 28, 00, 02, 00, 10, 00, 16, 30, 11, 1e, 01, 00, 02, 00, 10, 00, 11, 1e, 00, 15, 00, 16, 30, 15, 1a, 02, 00, 00, 00, 15, 00, 16, 17, 00, 19, 00, 1d, 1a, 00, 27, 00, 2c, 0d, 00, 2f, 02, 06, 2b, 02, 0c, 02, 06, 27, 03, 01, 00, 02]
+Raw bytes (120): 0x[01, 01, 0b, 01, 05, 05, 11, 05, 11, 1e, 15, 05, 11, 11, 15, 1e, 15, 05, 11, 09, 02, 0d, 2b, 09, 02, 0e, 01, 08, 01, 01, 09, 28, 01, 02, 01, 08, 00, 2e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 2e, 05, 00, 10, 00, 11, 28, 00, 02, 00, 10, 00, 16, 30, 11, 1e, 01, 00, 02, 00, 10, 00, 11, 1e, 00, 15, 00, 16, 30, 15, 1a, 02, 00, 00, 00, 15, 00, 16, 17, 00, 19, 00, 1d, 1a, 00, 27, 00, 2c, 0d, 00, 2f, 02, 06, 2b, 02, 0c, 02, 06, 27, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 11
@@ -74,7 +74,7 @@ Number of expressions: 11
- expression 9 operands: lhs = Counter(3), rhs = Expression(10, Add)
- expression 10 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 14
-- Code(Counter(0)) at (prev + 7, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 8, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 1, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 46)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -103,7 +103,7 @@ Number of file 0 mappings: 14
= (c3 + (c2 + (c0 - c1)))
Function name: nested_if::nested_in_then_block_in_condition
-Raw bytes (176): 0x[01, 01, 12, 01, 05, 05, 11, 05, 11, 3a, 15, 05, 11, 11, 15, 33, 19, 11, 15, 19, 1d, 19, 1d, 1d, 2e, 33, 19, 11, 15, 3a, 15, 05, 11, 09, 02, 0d, 47, 09, 02, 14, 01, 22, 01, 01, 09, 28, 02, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 00, 02, 00, 10, 00, 16, 30, 11, 3a, 01, 00, 02, 00, 10, 00, 11, 3a, 00, 15, 00, 16, 30, 15, 36, 02, 00, 00, 00, 15, 00, 16, 33, 00, 1c, 00, 1d, 28, 01, 02, 00, 1c, 00, 22, 30, 19, 2e, 01, 02, 00, 00, 1c, 00, 1d, 19, 00, 21, 00, 22, 30, 26, 1d, 02, 00, 00, 00, 21, 00, 22, 26, 00, 25, 00, 29, 2b, 00, 33, 00, 38, 36, 00, 44, 00, 49, 0d, 00, 4c, 02, 06, 47, 02, 0c, 02, 06, 43, 03, 01, 00, 02]
+Raw bytes (176): 0x[01, 01, 12, 01, 05, 05, 11, 05, 11, 3a, 15, 05, 11, 11, 15, 33, 19, 11, 15, 19, 1d, 19, 1d, 1d, 2e, 33, 19, 11, 15, 3a, 15, 05, 11, 09, 02, 0d, 47, 09, 02, 14, 01, 23, 01, 01, 09, 28, 02, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 00, 02, 00, 10, 00, 16, 30, 11, 3a, 01, 00, 02, 00, 10, 00, 11, 3a, 00, 15, 00, 16, 30, 15, 36, 02, 00, 00, 00, 15, 00, 16, 33, 00, 1c, 00, 1d, 28, 01, 02, 00, 1c, 00, 22, 30, 19, 2e, 01, 02, 00, 00, 1c, 00, 1d, 19, 00, 21, 00, 22, 30, 26, 1d, 02, 00, 00, 00, 21, 00, 22, 26, 00, 25, 00, 29, 2b, 00, 33, 00, 38, 36, 00, 44, 00, 49, 0d, 00, 4c, 02, 06, 47, 02, 0c, 02, 06, 43, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 18
@@ -126,7 +126,7 @@ Number of expressions: 18
- expression 16 operands: lhs = Counter(3), rhs = Expression(17, Add)
- expression 17 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 20
-- Code(Counter(0)) at (prev + 34, 1) to (start + 1, 9)
+- Code(Counter(0)) at (prev + 35, 1) to (start + 1, 9)
- MCDCDecision { bitmap_idx: 2, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 75)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
@@ -167,7 +167,7 @@ Number of file 0 mappings: 20
= (c3 + (c2 + (c0 - c1)))
Function name: nested_if::nested_single_condition_decision
-Raw bytes (85): 0x[01, 01, 06, 01, 05, 05, 11, 05, 11, 09, 02, 0d, 17, 09, 02, 0b, 01, 17, 01, 04, 09, 28, 00, 02, 04, 08, 00, 29, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 29, 05, 00, 10, 00, 11, 20, 11, 0a, 00, 10, 00, 11, 11, 00, 14, 00, 19, 0a, 00, 23, 00, 27, 0d, 00, 2a, 02, 06, 17, 02, 0c, 02, 06, 13, 03, 01, 00, 02]
+Raw bytes (85): 0x[01, 01, 06, 01, 05, 05, 11, 05, 11, 09, 02, 0d, 17, 09, 02, 0b, 01, 18, 01, 04, 09, 28, 00, 02, 04, 08, 00, 29, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 09, 02, 00, 00, 00, 0d, 00, 29, 05, 00, 10, 00, 11, 20, 11, 0a, 00, 10, 00, 11, 11, 00, 14, 00, 19, 0a, 00, 23, 00, 27, 0d, 00, 2a, 02, 06, 17, 02, 0c, 02, 06, 13, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 6
@@ -178,7 +178,7 @@ Number of expressions: 6
- expression 4 operands: lhs = Counter(3), rhs = Expression(5, Add)
- expression 5 operands: lhs = Counter(2), rhs = Expression(0, Sub)
Number of file 0 mappings: 11
-- Code(Counter(0)) at (prev + 23, 1) to (start + 4, 9)
+- Code(Counter(0)) at (prev + 24, 1) to (start + 4, 9)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 4, 8) to (start + 0, 41)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 8) to (start + 0, 9)
true = c1
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
index f8576831e75f..0c6928b684d6 100644
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ b/tests/coverage/mcdc/non_control_flow.cov-map
@@ -1,5 +1,5 @@
Function name: non_control_flow::assign_3
-Raw bytes (89): 0x[01, 01, 09, 05, 07, 0b, 11, 09, 0d, 01, 05, 01, 05, 22, 11, 01, 05, 22, 11, 01, 05, 0a, 01, 16, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 03, 00, 0d, 00, 18, 30, 05, 22, 01, 00, 02, 00, 0d, 00, 0e, 22, 00, 12, 00, 13, 30, 1e, 11, 02, 03, 00, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 30, 09, 0d, 03, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (89): 0x[01, 01, 09, 05, 07, 0b, 11, 09, 0d, 01, 05, 01, 05, 22, 11, 01, 05, 22, 11, 01, 05, 0a, 01, 17, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 03, 00, 0d, 00, 18, 30, 05, 22, 01, 00, 02, 00, 0d, 00, 0e, 22, 00, 12, 00, 13, 30, 1e, 11, 02, 03, 00, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 30, 09, 0d, 03, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 9
@@ -13,7 +13,7 @@ Number of expressions: 9
- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(4)
- expression 8 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 10
-- Code(Counter(0)) at (prev + 22, 1) to (start + 0, 40)
+- Code(Counter(0)) at (prev + 23, 1) to (start + 0, 40)
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
= (c1 + ((c2 + c3) + c4))
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
@@ -35,7 +35,7 @@ Number of file 0 mappings: 10
= (c1 + ((c2 + c3) + c4))
Function name: non_control_flow::assign_3_bis
-Raw bytes (85): 0x[01, 01, 07, 07, 11, 09, 0d, 01, 05, 05, 09, 16, 1a, 05, 09, 01, 05, 0a, 01, 1b, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 03, 00, 0d, 00, 18, 30, 05, 1a, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 16, 03, 00, 02, 00, 12, 00, 13, 13, 00, 17, 00, 18, 30, 0d, 11, 02, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (85): 0x[01, 01, 07, 07, 11, 09, 0d, 01, 05, 05, 09, 16, 1a, 05, 09, 01, 05, 0a, 01, 1c, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 03, 00, 0d, 00, 18, 30, 05, 1a, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 16, 03, 00, 02, 00, 12, 00, 13, 13, 00, 17, 00, 18, 30, 0d, 11, 02, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 7
@@ -47,7 +47,7 @@ Number of expressions: 7
- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 10
-- Code(Counter(0)) at (prev + 27, 1) to (start + 0, 44)
+- Code(Counter(0)) at (prev + 28, 1) to (start + 0, 44)
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
= ((c2 + c3) + c4)
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
@@ -68,7 +68,7 @@ Number of file 0 mappings: 10
= ((c2 + c3) + c4)
Function name: non_control_flow::assign_and
-Raw bytes (64): 0x[01, 01, 04, 07, 0e, 09, 0d, 01, 05, 01, 05, 08, 01, 0c, 01, 00, 21, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (64): 0x[01, 01, 04, 07, 0e, 09, 0d, 01, 05, 01, 05, 08, 01, 0d, 01, 00, 21, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
@@ -77,7 +77,7 @@ Number of expressions: 4
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 33)
+- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 33)
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
= ((c2 + c3) + (c0 - c1))
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
@@ -93,7 +93,7 @@ Number of file 0 mappings: 8
= ((c2 + c3) + (c0 - c1))
Function name: non_control_flow::assign_or
-Raw bytes (64): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 08, 01, 11, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 00, 02, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (64): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 08, 01, 12, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 00, 02, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
@@ -102,7 +102,7 @@ Number of expressions: 4
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 8
-- Code(Counter(0)) at (prev + 17, 1) to (start + 0, 32)
+- Code(Counter(0)) at (prev + 18, 1) to (start + 0, 32)
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
= ((c1 + c2) + c3)
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
@@ -119,15 +119,15 @@ Number of file 0 mappings: 8
= ((c1 + c2) + c3)
Function name: non_control_flow::foo
-Raw bytes (9): 0x[01, 01, 00, 01, 01, 25, 01, 02, 02]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 26, 01, 02, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
-- Code(Counter(0)) at (prev + 37, 1) to (start + 2, 2)
+- Code(Counter(0)) at (prev + 38, 1) to (start + 2, 2)
Function name: non_control_flow::func_call
-Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 29, 01, 01, 0a, 28, 00, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 0d, 02, 00, 00, 00, 0e, 00, 0f, 07, 01, 01, 00, 02]
+Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 2a, 01, 01, 0a, 28, 00, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 0d, 02, 00, 00, 00, 0e, 00, 0f, 07, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 3
@@ -135,7 +135,7 @@ Number of expressions: 3
- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(0, Sub)
- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
Number of file 0 mappings: 6
-- Code(Counter(0)) at (prev + 41, 1) to (start + 1, 10)
+- Code(Counter(0)) at (prev + 42, 1) to (start + 1, 10)
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 9) to (start + 0, 15)
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 9) to (start + 0, 10)
true = c1
@@ -148,7 +148,7 @@ Number of file 0 mappings: 6
= ((c2 + c3) + (c0 - c1))
Function name: non_control_flow::right_comb_tree
-Raw bytes (139): 0x[01, 01, 13, 07, 1a, 0b, 19, 0f, 15, 13, 11, 09, 0d, 01, 05, 01, 05, 05, 19, 05, 19, 4a, 15, 05, 19, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 0e, 01, 20, 01, 00, 41, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 05, 00, 0d, 00, 2a, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 4a, 19, 02, 03, 00, 00, 13, 00, 14, 4a, 00, 19, 00, 1a, 30, 46, 15, 03, 04, 00, 00, 19, 00, 1a, 46, 00, 1f, 00, 20, 30, 42, 11, 04, 05, 00, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 30, 09, 0d, 05, 00, 00, 00, 24, 00, 27, 03, 01, 05, 01, 02]
+Raw bytes (139): 0x[01, 01, 13, 07, 1a, 0b, 19, 0f, 15, 13, 11, 09, 0d, 01, 05, 01, 05, 05, 19, 05, 19, 4a, 15, 05, 19, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 0e, 01, 21, 01, 00, 41, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 05, 00, 0d, 00, 2a, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 4a, 19, 02, 03, 00, 00, 13, 00, 14, 4a, 00, 19, 00, 1a, 30, 46, 15, 03, 04, 00, 00, 19, 00, 1a, 46, 00, 1f, 00, 20, 30, 42, 11, 04, 05, 00, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 30, 09, 0d, 05, 00, 00, 00, 24, 00, 27, 03, 01, 05, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 19
@@ -172,7 +172,7 @@ Number of expressions: 19
- expression 17 operands: lhs = Expression(18, Sub), rhs = Counter(5)
- expression 18 operands: lhs = Counter(1), rhs = Counter(6)
Number of file 0 mappings: 14
-- Code(Counter(0)) at (prev + 32, 1) to (start + 0, 65)
+- Code(Counter(0)) at (prev + 33, 1) to (start + 0, 65)
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
= (((((c2 + c3) + c4) + c5) + c6) + (c0 - c1))
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
--
2.46.1

@ -1,23 +0,0 @@
diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-08-15 09:53:53.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-08-16 10:20:52.394575295 -0700
@@ -2195,7 +2195,6 @@ version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
dependencies = [
- "cc",
"pkg-config",
"vcpkg",
]
diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-08-16 10:20:52.394575295 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-08-16 10:21:50.535122479 -0700
@@ -77,7 +77,7 @@ proptest = "1.4.0"
pulldown-cmark = { version = "0.11.0", default-features = false, features = ["html"] }
rand = "0.8.5"
regex = "1.10.4"
-rusqlite = { version = "0.31.0", features = ["bundled"] }
+rusqlite = { version = "0.31.0", features = [] }
rustfix = { version = "0.8.2", path = "crates/rustfix" }
same-file = "1.0.6"
security-framework = "2.10.0"

@ -1,7 +1,7 @@
diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-08-26 09:03:52.769956890 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-08-26 09:03:52.773956573 -0700
@@ -2155,7 +2155,6 @@ checksum = "10472326a8a6477c3c20a64547b0
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-09-06 10:36:55.743405666 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-09-06 10:36:55.745405652 -0700
@@ -2156,7 +2156,6 @@ checksum = "10472326a8a6477c3c20a64547b0
dependencies = [
"cc",
"libc",
@ -9,7 +9,7 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2196,20 +2195,6 @@ dependencies = [
@@ -2197,20 +2196,6 @@ dependencies = [
"pkg-config",
"vcpkg",
]
@ -31,10 +31,10 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools
[[package]]
name = "libz-sys"
diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-08-26 09:03:52.773956573 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-08-26 09:05:08.595934397 -0700
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-09-06 10:36:55.746405645 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-09-06 10:37:13.849280464 -0700
@@ -44,7 +44,7 @@ curl = "0.4.46"
curl-sys = "0.4.72"
curl-sys = "0.4.73"
filetime = "0.2.23"
flate2 = { version = "1.0.30", default-features = false, features = ["zlib"] }
-git2 = "0.19.0"

@ -0,0 +1,23 @@
diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-09-06 10:30:29.435107742 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-09-06 10:31:57.168492758 -0700
@@ -2194,7 +2194,6 @@ version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
dependencies = [
- "cc",
"pkg-config",
"vcpkg",
]
diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-09-06 10:30:29.435107742 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-09-06 10:31:27.942697616 -0700
@@ -77,7 +77,7 @@ proptest = "1.5.0"
pulldown-cmark = { version = "0.11.0", default-features = false, features = ["html"] }
rand = "0.8.5"
regex = "1.10.5"
-rusqlite = { version = "0.32.0", features = ["bundled"] }
+rusqlite = { version = "0.32.0", features = [] }
rustfix = { version = "0.8.2", path = "crates/rustfix" }
same-file = "1.0.6"
security-framework = "2.11.1"

@ -2,14 +2,14 @@
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
Name: rust
Version: 1.81.0
Version: 1.82.0
Release: %autorelease
Summary: The Rust Programming Language
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
@ -24,9 +24,9 @@ ExclusiveArch: %{rust_arches}
# To bootstrap from scratch, set the channel and date from src/stage0.json
# e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13
# or nightly wants some beta-YYYY-MM-DD
%global bootstrap_version 1.80.1
%global bootstrap_channel 1.80.1
%global bootstrap_date 2024-08-08
%global bootstrap_version 1.81.0
%global bootstrap_channel 1.81.0
%global bootstrap_date 2024-09-05
# Only the specified arches will use bootstrap binaries.
# NOTE: Those binaries used to be uploaded with every new release, but that was
@ -85,17 +85,17 @@ ExclusiveArch: %{rust_arches}
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
# is insufficient. Rust currently requires LLVM 17.0+.
%global min_llvm_version 17.0.0
%global bundled_llvm_version 18.1.7
%global bundled_llvm_version 19.1.1
#global llvm_compat_version 17
%global llvm llvm%{?llvm_compat_version}
%bcond_with bundled_llvm
# Requires stable libgit2 1.7, and not the next minor soname change.
# Requires stable libgit2 1.8, and not the next minor soname change.
# This needs to be consistent with the bindings in vendor/libgit2-sys.
%global min_libgit2_version 1.8.1
%global next_libgit2_version 1.9.0~
%global bundled_libgit2_version 1.8.1
%if 0%{?fedora} >= 42
%if 0%{?fedora} >= 41
%bcond_with bundled_libgit2
%else
%bcond_without bundled_libgit2
@ -103,7 +103,7 @@ ExclusiveArch: %{rust_arches}
# Cargo uses UPSERTs with omitted conflict targets
%global min_sqlite3_version 3.35
%global bundled_sqlite3_version 3.45.0
%global bundled_sqlite3_version 3.46.0
%if 0%{?rhel} && 0%{?rhel} < 10
%bcond_without bundled_sqlite3
%else
@ -169,17 +169,13 @@ Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch
Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
# We don't want to use the bundled library in libsqlite3-sys
Patch6: rustc-1.81.0-unbundle-sqlite.patch
Patch6: rustc-1.82.0-unbundle-sqlite.patch
# handle no_std targets on std builds
# https://github.com/rust-lang/rust/pull/128182
Patch7: 0001-handle-no_std-targets-on-std-builds.patch
# https://github.com/rust-lang/rust/pull/130034
Patch7: 0001-Fix-enabling-wasm-component-ld-to-match-other-tools.patch
# https://github.com/rust-lang/rust/pull/130960
Patch8: 0001-Only-add-an-automatic-SONAME-for-Rust-dylibs.patch
# https://github.com/rust-lang/rust/pull/127513
Patch9: rustc-1.81.0-Update-to-LLVM-19.patch
# https://github.com/rust-lang/rust/pull/131838
Patch8: 0001-bootstrap-allow-setting-jobs-in-config.toml.patch
### RHEL-specific patches below ###
@ -190,7 +186,7 @@ Source102: cargo_vendor.attr
Source103: cargo_vendor.prov
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
Patch100: rustc-1.81.0-disable-libssh2.patch
Patch100: rustc-1.82.0-disable-libssh2.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
@ -689,7 +685,6 @@ rm -rf %{wasi_libc_dir}/dlmalloc/
%endif
%patch -P7 -p1
%patch -P8 -p1
%patch -P9 -p1
%if %with disabled_libssh2
%patch -P100 -p1
@ -785,12 +780,23 @@ end}
%{export_rust_env}
# Some builders have relatively little memory for their CPU count.
# At least 2GB per CPU is a good rule of thumb for building rustc.
ncpus=$(/usr/bin/getconf _NPROCESSORS_ONLN)
max_cpus=$(( ($(free -g | awk '/^Mem:/{print $2}') + 1) / 2 ))
if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then
ncpus="$max_cpus"
fi
# At least 4GB per CPU is a good rule of thumb for building rustc.
%if ! %defined constrain_build
%define constrain_build(m:) %{lua:
for l in io.lines('/proc/meminfo') do
if l:sub(1, 9) == "MemTotal:" then
local opt_m = math.tointeger(rpm.expand("%{-m*}"))
local mem_total = math.tointeger(string.match(l, "MemTotal:%s+(%d+)"))
local cpu_limit = math.max(1, mem_total // (opt_m * 1024))
if cpu_limit < math.tointeger(rpm.expand("%_smp_build_ncpus")) then
rpm.define("_smp_build_ncpus " .. cpu_limit)
end
break
end
end
}
%endif
%constrain_build -m 4096
%if %defined mingw_targets
%define mingw_target_config %{shrink:
@ -864,6 +870,7 @@ test -r "%{profiler}"
--disable-rpath \
%{enable_debuginfo} \
%{enable_rust_opts} \
--set build.jobs=%_smp_build_ncpus \
--set build.build-stage=2 \
--set build.doc-stage=2 \
--set build.install-stage=2 \
@ -883,7 +890,7 @@ test -r "%{profiler}"
%define profraw $PWD/build/profiles
%define profdata $PWD/build/rustc.profdata
mkdir -p "%{profraw}"
%{__x} build -j "$ncpus" sysroot --rust-profile-generate="%{profraw}"
%{__x} build sysroot --rust-profile-generate="%{profraw}"
# Build cargo as a workload to generate compiler profiles
env LLVM_PROFILE_FILE="%{profraw}/default_%%m_%%p.profraw" \
%{__x} --keep-stage=0 --keep-stage=1 build cargo
@ -895,7 +902,7 @@ rm -r "%{profraw}" build/%{rust_triple}/stage2*/
%endif
# Build the compiler normally (with or without PGO)
%{__x} build -j "$ncpus" sysroot
%{__x} build sysroot
# Build everything else normally
%{__x} build
@ -1205,6 +1212,12 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%changelog
## START: Generated by rpmautospec
* Mon Nov 04 2024 Josh Stone <jistone@redhat.com> - 1.82.0-1
- Update to Rust 1.82.0
* Wed Oct 30 2024 Jesus Checa Hidalgo <jchecahi@redhat.com> - 1.81.0-3
- Update rpminspect config with unicode rules
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.81.0-2
- Bump release for October 2024 mass rebuild:

Loading…
Cancel
Save