From bdd4c45b173055931db1c758cd7f016693d3a924 Mon Sep 17 00:00:00 2001 From: "Adam C. Foltzer" Date: Fri, 9 Jun 2017 14:51:58 -0700 Subject: Enhance Rust support - Adds a `crate_type` kwarg to library targets, allowing the different types of Rust [linkage][1]. - Shared libraries use the `dylib` crate type by default, but can also be `cdylib` - Static libraries use the `rlib` crate type by default, but can also be `staticlib` - If any Rust target has shared library dependencies, add the appropriate linker arguments, including rpath for the sysroot of the Rust compiler [1]: https://doc.rust-lang.org/reference/linkage.html --- docs/markdown/Reference-manual.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 492666b..61a66f0 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -510,11 +510,12 @@ Joins the given strings into a file system path segment. For example `join_paths Builds a library that is either static or shared depending on the value of `default_library` user option. You should use this instead of [`shared_library`](#shared_library) or [`static_library`](#static_library) most of the time. This allows you to toggle your entire project (including subprojects) from shared to static with only one option. -The keyword arguments for this are the same as for [`executable`](#executable) with the following addition: +The keyword arguments for this are the same as for [`executable`](#executable) with the following additions: - `name_prefix` the string that will be used as the suffix for the target by overriding the default (only used for libraries). By default this is `lib` on all platforms and compilers except with MSVC where it is omitted. +- `crate_type` specifies the crate type for Rust libraries. Defaults to `dylib` for shared libraries and `rlib` for static libraries. -`static_library` and `shared_library` also accept this keyword argument. +`static_library` and `shared_library` also accept these keyword arguments. ### message() -- cgit v1.1