Skip to content

Commit 96cc48f

Browse files
committed
libc: only provide an rlib.
There's absolutely no reason for `libc` to be offered as a dynamic library.
1 parent aec7f46 commit 96cc48f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

mk/crates.mk

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
102102
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
103103

104104
ONLY_RLIB_core := 1
105+
ONLY_RLIB_libc := 1
105106
ONLY_RLIB_rlibc := 1
106107
ONLY_RLIB_alloc := 1
107108
ONLY_RLIB_rand := 1

src/liblibc/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![no_std] // we don't need std, and we can't have std, since it doesn't exist
1515
// yet. std depends on us.
1616
#![crate_type = "rlib"]
17-
#![crate_type = "dylib"]
1817

1918
/*!
2019
* Bindings for the C standard library and other platform libraries
@@ -4436,4 +4435,7 @@ pub mod funcs {
44364435
}
44374436
}
44384437

4438+
#[doc(hidden)]
4439+
pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen correctly
4440+
44394441
#[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows

src/libstd/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ mod unicode;
254254
#[unstable]
255255
pub mod rt;
256256

257+
#[doc(hidden)]
258+
pub fn issue_14344_workaround() { // FIXME #14344 force linkage to happen correctly
259+
libc::issue_14344_workaround();
260+
}
261+
257262
// A curious inner-module that's not exported that contains the binding
258263
// 'std' so that macro-expanded references to std::error and such
259264
// can be resolved within libstd.

0 commit comments

Comments
 (0)