From be29fd65c5953f8acf75865523bfdbe799c9d529 Mon Sep 17 00:00:00 2001 From: Lucy Date: Mon, 29 Jul 2024 13:43:31 +0200 Subject: [PATCH] add `.objects` (#1166) --- src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 218b9e04..0c0a0450 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -501,6 +501,18 @@ impl Build { self } + /// Add arbitrary object files to link in + pub fn objects

(&mut self, objs: P) -> &mut Build + where + P: IntoIterator, + P::Item: AsRef, + { + for obj in objs { + self.object(obj); + } + self + } + /// Add an arbitrary flag to the invocation of the compiler /// /// # Example