feat: run transaction hooks at boundaries and add configurable LTO flags
- execute transaction pre hooks at transaction start and post hooks at transaction end - add batched hook execution with ordered "(n/total)" logging - refactor install flows to plan package actions first, then run hooks around commits - add `build.flags.ltoflags` and `build.flags.use_lto` (default: true) - export `LTOFLAGS` and append LTO flags to `CFLAGS`, `CXXFLAGS`, and `LDFLAGS` unless `use_lto = false` - make autotools CFLAGS expansion use the final computed CFLAGS value - update spec parsing/appends, interactive TOML output, docs, and contrib build config - bump project version to 0.8.0 and update `zip` to 8.2.0
This commit is contained in:
@@ -32,9 +32,14 @@ pub fn build(
|
||||
flags.cc.clone()
|
||||
};
|
||||
|
||||
if export_compiler_flags && !flags.cflags.is_empty() {
|
||||
// Expand shell command substitutions like $($CC -print-resource-dir)
|
||||
let cflags_str = flags.cflags.join(" ");
|
||||
if export_compiler_flags
|
||||
&& let Some(cflags_str) = env_vars
|
||||
.iter()
|
||||
.find(|(key, _)| key == "CFLAGS")
|
||||
.map(|(_, value)| value.clone())
|
||||
&& !cflags_str.trim().is_empty()
|
||||
{
|
||||
// Expand shell command substitutions like $($CC -print-resource-dir).
|
||||
let expanded = expand_shell_commands(&cflags_str, &cc)?;
|
||||
crate::builder::set_env_var(&mut env_vars, "CFLAGS", expanded);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user