]> git.lizzy.rs Git - rust.git/commit
Introduce target feature crt_static_allows_dylibs
authorSamuel Holland <samuel@sholland.org>
Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)
committerSamuel Holland <samuel@sholland.org>
Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)
commit12ceed013cdbd5d431a6908d49b2b6cb6fe1d032
treeaacbf2a92dbe3cdd43fa92c8e7e81094c7c37ace
parentbeb8abe9a5045a232b423b909b7aaffecbf8bafc
Introduce target feature crt_static_allows_dylibs

Most UNIX-like platforms do not allow shared libraries to statically
link their own libc, as libc expects to have consistent process-global
state. On those platforms, when we do not have a shared libc available,
we must not attempt to link dylibs or cdylibs. On Windows, however, it
is expected to statically link the CRT into dynamic libraries.

This feature is only relevant for targets that support both fully-static
and fully-dynamic linkage, such as musl on Linux.
src/librustc_back/target/mod.rs
src/librustc_back/target/windows_msvc_base.rs
src/librustc_trans_utils/link.rs