From 14a70f0e2fb070e1b85e59d789f98100d1cff14b Mon Sep 17 00:00:00 2001 From: opilarium Date: Sun, 16 Jul 2017 00:57:50 +0300 Subject: [PATCH] target/host examples --- src/lib.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7aab3ae..4e33441 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -364,6 +364,15 @@ impl Config { /// /// This option is automatically scraped from the `TARGET` environment /// variable by build scripts, so it's not required to call this function. + /// + /// # Example + /// + /// ```no_run + /// gcc::Config::new() + /// .file("src/foo.c") + /// .target("aarch64-linux-android") + /// .compile("libfoo.so"); + /// ``` pub fn target(&mut self, target: &str) -> &mut Config { self.target = Some(target.to_string()); self @@ -373,6 +382,15 @@ impl Config { /// /// This option is automatically scraped from the `HOST` environment /// variable by build scripts, so it's not required to call this function. + /// + /// # Example + /// + /// ```no_run + /// gcc::Config::new() + /// .file("src/foo.c") + /// .host("arm-linux-gnueabihf") + /// .compile("libfoo.so"); + /// ``` pub fn host(&mut self, host: &str) -> &mut Config { self.host = Some(host.to_string()); self