Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cc"
version = "1.2.40"
version = "1.2.41"
authors = ["Alex Crichton <[email protected]>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cc-rs"
Expand Down
11 changes: 7 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,26 +783,28 @@ impl Build {

/// Set the `-shared` flag.
///
/// When enabled, the compiler will produce a shared object which can
/// then be linked with other objects to form an executable.
/// This will typically be ignored by the compiler when calling [`Self::compile()`] since it only
/// produces static libraries.
///
/// # Example
///
/// ```no_run
/// // This will create a library named "liblibfoo.so.a"
/// cc::Build::new()
/// .file("src/foo.c")
/// .shared_flag(true)
/// .compile("libfoo.so");
/// ```
#[deprecated = "cc only creates static libraries, setting this does nothing"]
pub fn shared_flag(&mut self, shared_flag: bool) -> &mut Build {
self.shared_flag = Some(shared_flag);
self
}

/// Set the `-static` flag.
///
/// When enabled on systems that support dynamic linking, this prevents
/// linking with the shared libraries.
/// This will typically be ignored by the compiler when calling [`Self::compile()`] since it only
/// produces static libraries.
///
/// # Example
///
Expand All @@ -813,6 +815,7 @@ impl Build {
/// .static_flag(true)
/// .compile("foo");
/// ```
#[deprecated = "cc only creates static libraries, setting this does nothing"]
pub fn static_flag(&mut self, static_flag: bool) -> &mut Build {
self.static_flag = Some(static_flag);
self
Expand Down
Loading