From d3303b02b5d11fe84152c454c42a314d78144d9b Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Thu, 18 Jul 2024 12:39:42 +0200 Subject: Update extern linking documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In particular, remove the note saying cdylibs can't link against dylibs — that hasn't been true for over four years. * 2019-11-07: note is written: https://github.com/rust-lang/rust/commit/b54e8ecc2e0eec9ab9d0b1c1d9cb55f7602800c4 * 2020-01-23: restriction is lifted (without updating docs): https://github.com/rust-lang/rust/commit/72aaa3a414d17aa0c4f19feafa5bab5f84b60e63 --- src/doc/rustc/src/codegen-options/index.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md index cd10168bc1c..cb43feca758 100644 --- a/src/doc/rustc/src/codegen-options/index.md +++ b/src/doc/rustc/src/codegen-options/index.md @@ -410,13 +410,16 @@ See also the [`no-prepopulate-passes`](#no-prepopulate-passes) flag. By default, `rustc` prefers to statically link dependencies. This option will indicate that dynamic linking should be used if possible if both a static and -dynamic versions of a library are available. There is an internal algorithm -for determining whether or not it is possible to statically or dynamically -link with a dependency. For example, `cdylib` crate types may only use static -linkage. This flag takes one of the following values: +dynamic versions of a library are available. -* `y`, `yes`, `on`, `true` or no value: use dynamic linking. -* `n`, `no`, `off` or `false`: use static linking (the default). +There is [an internal algorithm](https://github.com/rust-lang/rust/blob/master/compiler/rustc_metadata/src/dependency_format.rs) +for determining whether or not it is possible to statically or dynamically link +with a dependency. + +This flag takes one of the following values: + +* `y`, `yes`, `on`, `true` or no value: prefer dynamic linking. +* `n`, `no`, `off` or `false`: prefer static linking (the default). ## profile-generate -- cgit 1.4.1-3-g733a5 From 4dc8e66074ac25ebbaffbdd1872febff9ac444c5 Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Thu, 18 Jul 2024 15:49:10 +0200 Subject: Allow a git command for getting the current branch in bootstrap to fail It can fail when in git is in detached HEAD mode. --- src/bootstrap/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index db1fa05a82c..a77c20067e6 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -535,6 +535,7 @@ impl Build { // even though that has no relation to the upstream for the submodule. let current_branch = helpers::git(Some(&self.src)) .capture_stdout() + .allow_failure() .run_always() .args(["symbolic-ref", "--short", "HEAD"]) .run(self) -- cgit 1.4.1-3-g733a5