Skip to content

Commit c7e595a

Browse files
committed
more bootstrapping
1 parent 3824d15 commit c7e595a

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

builtins-test/src/lib.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,20 @@ macro_rules! apfloat_fallback {
407407

408408
mod bootstrap {
409409
// Needed for testing other symbols,
410-
#[linkage = "weak"]
411-
#[unsafe(no_mangle)]
412410
#[cfg(f16_enabled)]
413411
#[cfg(target_arch = "s390x")]
412+
#[linkage = "weak"]
413+
#[unsafe(no_mangle)]
414414
pub extern "C" fn __extendhfsf2(a: f16) -> f32 {
415415
compiler_builtins::float::extend::__extendhfsf2(a)
416416
}
417+
418+
#[cfg(f16_enabled)]
419+
#[cfg(f128_enabled)]
420+
#[cfg(target_arch = "x86")]
421+
#[linkage = "weak"]
422+
#[unsafe(no_mangle)]
423+
pub extern "C" fn __extenddftf2(a: f64) -> f128 {
424+
compiler_builtins::float::extend::__extenddftf2(a)
425+
}
417426
}

libm/configure.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl Config {
3434
.collect();
3535

3636
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
37-
let bootstrapping_f16 = target_arch == "x86";
37+
let bootstrapping_f128 = target_arch == "x86";
3838

3939
Self {
4040
target_triple,
@@ -53,8 +53,8 @@ impl Config {
5353
// with `RUSTC_BOOTSTRAP=1` (which is required to use the types anyway).
5454
// reliable_f128: env::var_os("CARGO_CFG_TARGET_HAS_RELIABLE_F128").is_some(),
5555
// reliable_f16: env::var_os("CARGO_CFG_TARGET_HAS_RELIABLE_F16").is_some(),
56-
reliable_f16: !bootstrapping_f16,
57-
reliable_f128: true,
56+
reliable_f16: true,
57+
reliable_f128: bootstrapping_f128,
5858
}
5959
}
6060
}

0 commit comments

Comments
 (0)