| 242 | } |
| 243 | |
| 244 | fn create_objdiff_config(state: &AppState) -> ObjDiffConfig { |
| 245 | ObjDiffConfig { |
| 246 | build_config: BuildConfig { |
| 247 | project_dir: state.project_dir.clone(), |
| 248 | custom_make: state |
| 249 | .project_config |
| 250 | .as_ref() |
| 251 | .and_then(|c| c.custom_make.as_ref()) |
| 252 | .cloned(), |
| 253 | custom_args: state |
| 254 | .project_config |
| 255 | .as_ref() |
| 256 | .and_then(|c| c.custom_args.as_ref()) |
| 257 | .cloned(), |
| 258 | selected_wsl_distro: None, |
| 259 | }, |
| 260 | build_base: state.project_config.as_ref().is_some_and(|p| p.build_base.unwrap_or(true)), |
| 261 | build_target: state |
| 262 | .project_config |
| 263 | .as_ref() |
| 264 | .is_some_and(|p| p.build_target.unwrap_or(false)), |
| 265 | target_path: state.target_path.clone(), |
| 266 | base_path: state.base_path.clone(), |
| 267 | diff_obj_config: state.diff_obj_config.clone(), |
| 268 | mapping_config: state.mapping_config.clone(), |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | /// The configuration for a single object file. |
| 273 | #[derive(Default, Clone, serde::Deserialize, serde::Serialize)] |