Skip to content

Commit 0ac3e1e

Browse files
authored
Update linkage of libm for nightly Rust (#10587)
Upstream rustc has changed meaning that the `ceil` function is now defined in bcompiler-builtins, so link a different symbol to force pulling in `libm` to get `dlsym` working for its symbols in Cranelift tests.
1 parent 7399206 commit 0ac3e1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cranelift/filetests/src/function_runner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ impl TestFileCompiler {
112112
#[cfg(unix)]
113113
{
114114
unsafe extern "C" {
115-
safe fn ceilf(f: f32) -> f32;
115+
safe fn cosf(f: f32) -> f32;
116116
}
117117
let f = 1.2_f32;
118-
assert_eq!(f.ceil(), ceilf(f));
118+
assert_eq!(f.cos(), cosf(f));
119119
}
120120

121121
let module = JITModule::new(builder);

0 commit comments

Comments
 (0)