Skip to content

Commit 9fbba7b

Browse files
committedNov 30, 2013
Statically link librustrt to libstd
This commit alters the build process of the compiler to build a static librustrt.a instead of a dynamic version. This means that we can stop distributing librustrt as well as default linking against it in the compiler. This also means that if you attempt to build rust code without libstd, it will no longer work if there are any landing pads in play. The reason for this is that LLVM and rustc will emit calls to the various upcalls in librustrt used to manage exception handling. In theory we could split librustrt into librustrt and librustupcall. We would then distribute librustupcall and link to it for all programs using landing pads, but I would rather see just one librustrt artifact and simplify the build process. The major benefit of doing this is that building a static rust library for use in embedded situations all of a sudden just became a whole lot more feasible. Closes #3361
1 parent e338a41 commit 9fbba7b

36 files changed

+46
-75
lines changed
 

‎Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ GENERATED :=
222222

223223
define DEF_LIBS
224224

225-
CFG_RUNTIME_$(1) :=$(call CFG_LIB_NAME_$(1),rustrt)
225+
CFG_RUNTIME_$(1) :=$(call CFG_STATIC_LIB_NAME_$(1),rustrt)
226226
CFG_RUSTLLVM_$(1) :=$(call CFG_LIB_NAME_$(1),rustllvm)
227227
CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std)
228228
CFG_EXTRALIB_$(1) :=$(call CFG_LIB_NAME_$(1),extra)

‎mk/install.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ install-target-$(1)-host-$(2): LIB_SOURCE_DIR=$$(TL$(1)$(2))
8888
install-target-$(1)-host-$(2): LIB_DESTIN_DIR=$$(PTL$(1)$(2))
8989
install-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
9090
$$(Q)$$(call MK_INSTALL_DIR,$$(PTL$(1)$(2)))
91-
$$(Q)$$(call INSTALL_LIB,$$(CFG_RUNTIME_$(1)))
9291
$$(Q)$$(call INSTALL_LIB,$$(STDLIB_GLOB_$(1)))
9392
$$(Q)$$(call INSTALL_LIB,$$(EXTRALIB_GLOB_$(1)))
9493
$$(Q)$$(call INSTALL_LIB,$$(LIBRUSTUV_GLOB_$(1)))
@@ -101,7 +100,6 @@ install-target-$(1)-host-$(2): LIB_SOURCE_DIR=$$(TL$(1)$(2))
101100
install-target-$(1)-host-$(2): LIB_DESTIN_DIR=$$(PTL$(1)$(2))
102101
install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
103102
$$(Q)$$(call MK_INSTALL_DIR,$$(PTL$(1)$(2)))
104-
$$(Q)$$(call INSTALL_LIB,$$(CFG_RUNTIME_$(1)))
105103
$$(Q)$$(call INSTALL_LIB,$$(CFG_RUSTLLVM_$(1)))
106104
$$(Q)$$(call INSTALL_LIB,$$(STDLIB_GLOB_$(1)))
107105
$$(Q)$$(call INSTALL_LIB,$$(EXTRALIB_GLOB_$(1)))
@@ -153,7 +151,6 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_)_H_$(CFG_BUILD_))
153151
$(Q)$(call INSTALL_LIB,$(LIBSYNTAX_GLOB_$(CFG_BUILD)))
154152
$(Q)$(call INSTALL_LIB,$(LIBRUSTPKG_GLOB_$(CFG_BUILD)))
155153
$(Q)$(call INSTALL_LIB,$(LIBRUSTDOC_GLOB_$(CFG_BUILD)))
156-
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME_$(CFG_BUILD)))
157154
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM_$(CFG_BUILD)))
158155
$(Q)$(call INSTALL,$(S)/man,$(CFG_MANDIR)/man1,rustc.1)
159156
$(Q)$(call INSTALL,$(S)/man,$(CFG_MANDIR)/man1,rustdoc.1)
@@ -170,7 +167,6 @@ uninstall:
170167
$(Q)rm -f $(PHB)/rustpkg$(X_$(CFG_BUILD))
171168
$(Q)rm -f $(PHB)/rustdoc$(X_$(CFG_BUILD))
172169
$(Q)rm -f $(PHL)/$(CFG_RUSTLLVM_$(CFG_BUILD))
173-
$(Q)rm -f $(PHL)/$(CFG_RUNTIME_$(CFG_BUILD))
174170
$(Q)for i in \
175171
$(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_GLOB_$(CFG_BUILD))) \
176172
$(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_RGLOB_$(CFG_BUILD))) \
@@ -238,7 +234,6 @@ endif
238234
define INSTALL_RUNTIME_TARGET_N
239235
install-runtime-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
240236
$(Q)$(call ADB_SHELL,mkdir,$(CFG_RUNTIME_PUSH_DIR))
241-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CFG_RUNTIME_$(1)),$(CFG_RUNTIME_PUSH_DIR))
242237
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(STDLIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
243238
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(EXTRALIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
244239
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(LIBRUSTUV_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
@@ -247,7 +242,6 @@ endef
247242
define INSTALL_RUNTIME_TARGET_CLEANUP_N
248243
install-runtime-target-$(1)-cleanup:
249244
$(Q)$(call ADB,remount)
250-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CFG_RUNTIME_$(1)))
251245
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(STDLIB_GLOB_$(1)))
252246
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(EXTRALIB_GLOB_$(1)))
253247
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(LIBRUSTUV_GLOB_$(1)))

‎mk/rt.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,9 @@ $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJS_
121121
@$$(call E, link: $$@)
122122
$$(Q)$(AR_$(1)) rcs $$@ $$^
123123

124-
$$(RT_BUILD_DIR_$(1)_$(2))/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS) \
125-
$$(RUNTIME_DEF_$(1)_$(2))
124+
$$(RT_BUILD_DIR_$(1)_$(2))/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS)
126125
@$$(call E, link: $$@)
127-
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@, $$(RUNTIME_OBJS_$(1)_$(2)) \
128-
$$(CFG_LIBUV_LINK_FLAGS_$(1)),$$(RUNTIME_DEF_$(1)_$(2)),$$(CFG_RUNTIME_$(1)))
126+
$$(Q)$(AR_$(1)) rcs $$@ $$(RUNTIME_OBJS_$(1)_$(2))
129127

130128
# These could go in rt.mk or rustllvm.mk, they're needed for both.
131129

‎src/etc/snapshot.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,27 @@ def scrub(b):
3131
"lib/librustc-*.so",
3232
"lib/libsyntax-*.so",
3333
"lib/librustuv-*.so",
34-
"lib/librustrt.so",
3534
"lib/librustllvm.so"],
3635
"macos": ["bin/rustc",
3736
"lib/libstd-*.dylib",
3837
"lib/libextra-*.dylib",
3938
"lib/librustc-*.dylib",
4039
"lib/libsyntax-*.dylib",
4140
"lib/librustuv-*.dylib",
42-
"lib/librustrt.dylib",
4341
"lib/librustllvm.dylib"],
4442
"winnt": ["bin/rustc.exe",
4543
"bin/std-*.dll",
4644
"bin/extra-*.dll",
4745
"bin/rustc-*.dll",
4846
"bin/syntax-*.dll",
4947
"bin/rustuv-*.dll",
50-
"bin/rustrt.dll",
5148
"bin/rustllvm.dll"],
5249
"freebsd": ["bin/rustc",
5350
"lib/libstd-*.so",
5451
"lib/libextra-*.so",
5552
"lib/librustc-*.so",
5653
"lib/libsyntax-*.so",
5754
"lib/librustuv-*.so",
58-
"lib/librustrt.so",
5955
"lib/librustllvm.so"]
6056
}
6157

‎src/libstd/rtdeps.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! necessary for running libstd.
1414
1515
// All platforms need to link to rustrt
16-
#[link(name = "rustrt")]
16+
#[link(name = "rustrt", kind = "static")]
1717
extern {}
1818

1919
// LLVM implements the `frem` instruction as a call to `fmod`, which lives in
@@ -26,6 +26,7 @@ extern {}
2626
#[link(name = "dl")]
2727
#[link(name = "m")]
2828
#[link(name = "pthread")]
29+
#[link(name = "stdc++")]
2930
extern {}
3031

3132
#[cfg(target_os = "android")]
@@ -45,4 +46,9 @@ extern {}
4546

4647
#[cfg(target_os = "macos")]
4748
#[link(name = "pthread")]
49+
#[link(name = "stdc++")]
50+
extern {}
51+
52+
#[cfg(stage0)]
53+
#[link_args = "-lstdc++"]
4854
extern {}

‎src/rt/rustrt.def.in

Lines changed: 0 additions & 51 deletions
This file was deleted.

‎src/test/auxiliary/anon-extern-mod-cross-crate-1.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[link_name = "rustrt"];
12-
#[link(name = "anonexternmod",
13-
vers = "0.1")];
11+
#[link(name = "anonexternmod", vers = "0.1")];
1412

1513
#[crate_type = "lib"];
1614

1715
use std::libc;
1816

1917
extern {
18+
#[link(name = "rustrt")]
2019
pub fn rust_get_test_int() -> libc::intptr_t;
2120
}

‎src/test/auxiliary/extern-crosscrate-source.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use std::libc;
1818
pub mod rustrt {
1919
use std::libc;
2020

21+
#[link(name = "rustrt")]
2122
extern {
2223
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
2324
data: libc::uintptr_t)

‎src/test/auxiliary/foreign_lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
pub mod rustrt {
1414
use std::libc;
1515

16+
#[link(name = "rustrt")]
1617
extern {
1718
fn rust_get_test_int() -> libc::intptr_t;
1819
}

‎src/test/run-pass/anon-extern-mod-cross-crate-2.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ extern mod anonexternmod;
1414

1515
use anonexternmod::rust_get_test_int;
1616

17+
#[link(name = "rustrt")] // we have explicitly chosen to require this
18+
extern {}
19+
1720
pub fn main() {
1821
unsafe {
1922
rust_get_test_int();

‎src/test/run-pass/anon-extern-mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use std::libc;
1212

13-
#[link_name = "rustrt"]
13+
#[link(name = "rustrt")]
1414
extern {
1515
fn rust_get_test_int() -> libc::intptr_t;
1616
}

‎src/test/run-pass/c-stack-as-value.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
mod rustrt {
1212
use std::libc;
1313

14+
#[link(name = "rustrt")]
1415
extern {
1516
pub fn rust_get_test_int() -> libc::intptr_t;
1617
}

‎src/test/run-pass/extern-call-deep.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use std::libc;
1313
mod rustrt {
1414
use std::libc;
1515

16+
#[link(name = "rustrt")]
1617
extern {
1718
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
1819
data: libc::uintptr_t)

‎src/test/run-pass/extern-call-deep2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::task;
1414
mod rustrt {
1515
use std::libc;
1616

17+
#[link(name = "rustrt")]
1718
extern {
1819
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
1920
data: libc::uintptr_t)

‎src/test/run-pass/extern-call-indirect.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use std::libc;
1313
mod rustrt {
1414
use std::libc;
1515

16+
#[link(name = "rustrt")]
1617
extern {
1718
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
1819
data: libc::uintptr_t)

‎src/test/run-pass/extern-call-scrub.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use std::task;
1818
mod rustrt {
1919
use std::libc;
2020

21+
#[link(name = "rustrt")]
2122
extern {
2223
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
2324
data: libc::uintptr_t)

‎src/test/run-pass/extern-pass-TwoU16s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct TwoU16s {
1818
one: u16, two: u16
1919
}
2020

21+
#[link(name = "rustrt")]
2122
extern {
2223
pub fn rust_dbg_extern_identity_TwoU16s(v: TwoU16s) -> TwoU16s;
2324
}

‎src/test/run-pass/extern-pass-TwoU32s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct TwoU32s {
1616
one: u32, two: u32
1717
}
1818

19+
#[link(name = "rustrt")]
1920
extern {
2021
pub fn rust_dbg_extern_identity_TwoU32s(v: TwoU32s) -> TwoU32s;
2122
}

‎src/test/run-pass/extern-pass-TwoU64s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct TwoU64s {
1818
one: u64, two: u64
1919
}
2020

21+
#[link(name = "rustrt")]
2122
extern {
2223
pub fn rust_dbg_extern_identity_TwoU64s(v: TwoU64s) -> TwoU64s;
2324
}

‎src/test/run-pass/extern-pass-TwoU8s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct TwoU8s {
1818
one: u8, two: u8
1919
}
2020

21+
#[link(name = "rustrt")]
2122
extern {
2223
pub fn rust_dbg_extern_identity_TwoU8s(v: TwoU8s) -> TwoU8s;
2324
}

‎src/test/run-pass/extern-pass-char.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// Test a function that takes/returns a u8.
1212

13+
#[link(name = "rustrt")]
1314
extern {
1415
pub fn rust_dbg_extern_identity_u8(v: u8) -> u8;
1516
}

‎src/test/run-pass/extern-pass-double.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#[link(name = "rustrt")]
1112
extern {
1213
pub fn rust_dbg_extern_identity_double(v: f64) -> f64;
1314
}

‎src/test/run-pass/extern-pass-u32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// Test a function that takes/returns a u32.
1212

13+
#[link(name = "rustrt")]
1314
extern {
1415
pub fn rust_dbg_extern_identity_u32(v: u32) -> u32;
1516
}

‎src/test/run-pass/extern-pass-u64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// Test a call to a function that takes/returns a u64.
1212

13+
#[link(name = "rustrt")]
1314
extern {
1415
pub fn rust_dbg_extern_identity_u64(v: u64) -> u64;
1516
}

‎src/test/run-pass/extern-return-TwoU16s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ struct TwoU16s {
1212
one: u16, two: u16
1313
}
1414

15+
#[link(name = "rustrt")]
1516
extern {
1617
pub fn rust_dbg_extern_return_TwoU16s() -> TwoU16s;
1718
}

‎src/test/run-pass/extern-return-TwoU32s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ struct TwoU32s {
1212
one: u32, two: u32
1313
}
1414

15+
#[link(name = "rustrt")]
1516
extern {
1617
pub fn rust_dbg_extern_return_TwoU32s() -> TwoU32s;
1718
}

‎src/test/run-pass/extern-return-TwoU64s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct TwoU64s {
1414
one: u64, two: u64
1515
}
1616

17+
#[link(name = "rustrt")]
1718
extern {
1819
pub fn rust_dbg_extern_return_TwoU64s() -> TwoU64s;
1920
}

‎src/test/run-pass/extern-return-TwoU8s.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ struct TwoU8s {
1212
one: u8, two: u8
1313
}
1414

15+
#[link(name = "rustrt")]
1516
extern {
1617
pub fn rust_dbg_extern_return_TwoU8s() -> TwoU8s;
1718
}

‎src/test/run-pass/extern-stress.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use std::task;
1717
mod rustrt {
1818
use std::libc;
1919

20+
#[link(name = "rustrt")]
2021
extern {
2122
pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
2223
data: libc::uintptr_t)

‎src/test/run-pass/extern-yield.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::task;
1414
mod rustrt {
1515
use std::libc;
1616

17+
#[link(name = "rustrt")]
1718
extern {
1819
pub fn rust_dbg_call(cb: extern "C" fn (libc::uintptr_t) -> libc::uintptr_t,
1920
data: libc::uintptr_t)

‎src/test/run-pass/foreign-call-no-runtime.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::cast;
22
use std::libc;
33
use std::unstable::run_in_bare_thread;
44

5+
#[link(name = "rustrt")]
56
extern {
67
fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t),
78
data: libc::uintptr_t) -> libc::uintptr_t;

‎src/test/run-pass/foreign-dupe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
mod rustrt1 {
1515
use std::libc;
1616

17-
#[link_name = "rustrt"]
17+
#[link(name = "rustrt")]
1818
extern {
1919
pub fn rust_get_test_int() -> libc::intptr_t;
2020
}
@@ -23,7 +23,7 @@ mod rustrt1 {
2323
mod rustrt2 {
2424
use std::libc;
2525

26-
#[link_name = "rustrt"]
26+
#[link(name = "rustrt")]
2727
extern {
2828
pub fn rust_get_test_int() -> libc::intptr_t;
2929
}

‎src/test/run-pass/foreign-no-abi.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
mod rustrt {
1414
use std::libc;
1515

16+
#[link(name = "rustrt")]
1617
extern {
1718
pub fn rust_get_test_int() -> libc::intptr_t;
1819
}

‎src/test/run-pass/invoke-external-foreign.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
extern mod foreign_lib;
1919

20+
#[link(name = "rustrt")] // we have explicitly chosen to require this
21+
extern {}
22+
2023
pub fn main() {
2124
unsafe {
2225
let _foo = foreign_lib::rustrt::rust_get_test_int();

‎src/test/run-pass/static-mut-foreign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use std::libc;
1616

17-
#[nolink]
17+
#[link(name = "rustrt")]
1818
extern {
1919
static mut rust_dbg_static_mut: libc::c_int;
2020
pub fn rust_dbg_static_mut_check_four();

‎src/test/run-pass/struct-return.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct Floats { a: f64, b: u8, c: f64 }
1616
mod rustrt {
1717
use super::{Floats, Quad};
1818

19-
#[nolink]
19+
#[link(name = "rustrt")]
2020
extern {
2121
pub fn rust_dbg_abi_1(q: Quad) -> Quad;
2222
pub fn rust_dbg_abi_2(f: Floats) -> Floats;

0 commit comments

Comments
 (0)
Please sign in to comment.