Skip to content

Commit

Permalink
Unrolled build for rust-lang#120109
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#120109 - joboet:move_pal_cmath, r=ChrisDenton

Move cmath into `sys`

Part of rust-lang#117276.

r? ``@ChrisDenton``
  • Loading branch information
rust-timer authored Jan 23, 2024
2 parents d5fd099 + f88e643 commit 24e97e7
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(not(test))]

// These symbols are all defined by `libm`,
// or by `compiler-builtins` on unsupported platforms.

Expand Down
11 changes: 11 additions & 0 deletions library/std/src/sys/cmath/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#![cfg(not(test))]

cfg_if::cfg_if! {
if #[cfg(target_os = "windows")] {
mod windows;
pub use windows::*;
} else {
mod builtins;
pub use builtins::*;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![cfg(not(test))]

use core::ffi::{c_double, c_float, c_int};

extern "C" {
Expand Down
4 changes: 3 additions & 1 deletion library/std/src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
/// descriptors.
mod pal;

pub mod os_str;
mod personality;

pub mod cmath;
pub mod os_str;

// FIXME(117276): remove this, move feature implementations into individual
// submodules.
pub use pal::*;
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/hermit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ use crate::os::raw::c_char;

pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
pub mod fs;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/sgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ mod waitqueue;

pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
#[path = "../unsupported/fs.rs"]
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/solid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ mod itron {
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
// `error` is `pub(crate)` so that it can be accessed by `itron/error.rs` as
// `crate::sys::error`
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/teeos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ pub use self::rand::hashmap_random_keys;
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
#[path = "../unsupported/env.rs"]
pub mod env;
pub mod locks;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/uefi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
#[path = "../unsupported/fs.rs"]
pub mod fs;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ pub mod weak;
pub mod alloc;
pub mod android;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
pub mod fs;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/unsupported/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fs;
pub mod io;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/wasi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ use crate::mem;
#[path = "../unix/alloc.rs"]
pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
pub mod fs;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
#[path = "../unsupported/fs.rs"]
pub mod fs;
Expand Down
1 change: 0 additions & 1 deletion library/std/src/sys/pal/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub mod compat;
pub mod alloc;
pub mod args;
pub mod c;
pub mod cmath;
pub mod env;
pub mod fs;
pub mod handle;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/xous/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
#[path = "../unsupported/env.rs"]
pub mod env;
#[path = "../unsupported/fs.rs"]
Expand Down

0 comments on commit 24e97e7

Please sign in to comment.