(&self, dir: &Path)
| 335 | } |
| 336 | |
| 337 | pub fn copy_library_init_file(&self, dir: &Path) -> Result<()> { |
| 338 | if let Some(init_file) = &self.config.init_file { |
| 339 | let file_path: PathBuf = [ |
| 340 | self.get_library_build_dir()?, |
| 341 | "work".into(), |
| 342 | init_file.into(), |
| 343 | ] |
| 344 | .iter() |
| 345 | .collect(); |
| 346 | if !file_path.exists() { |
| 347 | eyre::bail!("Cannot find the library initialize file {init_file:?}") |
| 348 | } |
| 349 | let cur_file: PathBuf = [PathBuf::from(dir), init_file.into()].iter().collect(); |
| 350 | std::fs::copy(file_path, cur_file)?; |
| 351 | } |
| 352 | Ok(()) |
| 353 | } |
| 354 | |
| 355 | pub fn add_extra_c_flags(&self, cmd: &mut Command) -> Result<()> { |
| 356 | if let Some(flags) = &self.config.extra_c_flags { |
no test coverage detected