diff --git a/Sources/SWBCore/BuildParameters.swift b/Sources/SWBCore/BuildParameters.swift index 8b8fced8..e3685da3 100644 --- a/Sources/SWBCore/BuildParameters.swift +++ b/Sources/SWBCore/BuildParameters.swift @@ -191,7 +191,7 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable { try container.encodeIfPresent(activeRunDestination, forKey: .activeRunDestination) try container.encodeIfPresent(activeArchitecture, forKey: .activeArchitecture) try container.encodeIfPresent(arena, forKey: .arena) - try container.encode(overrides, forKey: .overrides) + try container.encode(filterOverrides(overrides), forKey: .overrides) try container.encode(commandLineOverrides, forKey: .commandLineOverrides) try container.encodeIfPresent(commandLineConfigOverridesPath, forKey: .commandLineConfigOverridesPath) try container.encode(commandLineConfigOverrides, forKey: .commandLineConfigOverrides) @@ -228,7 +228,7 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable { hasher.combine(activeRunDestination) hasher.combine(activeArchitecture) hasher.combine(arena) - hasher.combine(overrides) + hasher.combine(filterOverrides(overrides)) hasher.combine(commandLineOverrides) hasher.combine(commandLineConfigOverridesPath) hasher.combine(commandLineConfigOverrides) @@ -237,6 +237,15 @@ public struct BuildParameters: Hashable, SerializableCodable, Sendable { hasher.combine(toolchainOverride) return hasher.finalize() } + + private func filterOverrides(_ overrides: [String: String]) -> [String: String] { + overrides.mapValues { value in + // Remove -v flag from the value to avoid rebuild + value.split(separator: " ") + .filter { $0 != "-v" } + .joined(separator: " ") + } + } } extension BuildParameters {