Skip to content

Commit

Permalink
Rollup merge of #75749 - ehuss:consolidate-sys, r=alexcrichton
Browse files Browse the repository at this point in the history
Consolidate some duplicate code in the sys modules.

This consolidates some modules which were duplicated throughout the sys module. The intent is to make it easier to update and maintain this code. This mainly affects the wasi, sgx, and "unsupported" targets.

I explicitly skipped hermit, cloudabi, and vxworks. These tier-3 targets have copied large sections of the sys tree. I don't think they should have, but I don't want to put effort into changing them. It also doesn't help that there aren't any scripts or instructions for building them.

There are still sections of duplicate code here and there, but this PR covers the easy parts where entire modules are the same.
  • Loading branch information
Dylan-DPC authored Sep 15, 2020
2 parents fa4cfeb + 25cca07 commit 034af08
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 889 deletions.
308 changes: 0 additions & 308 deletions library/std/src/sys/sgx/fs.rs

This file was deleted.

47 changes: 0 additions & 47 deletions library/std/src/sys/sgx/io.rs

This file was deleted.

4 changes: 4 additions & 0 deletions library/std/src/sys/sgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ pub mod condvar;
pub mod env;
pub mod ext;
pub mod fd;
#[path = "../unsupported/fs.rs"]
pub mod fs;
#[path = "../unsupported/io.rs"]
pub mod io;
pub mod memchr;
pub mod mutex;
pub mod net;
pub mod os;
pub mod path;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
#[path = "../unsupported/process.rs"]
pub mod process;
pub mod rwlock;
pub mod stack_overflow;
Expand Down
Loading

0 comments on commit 034af08

Please sign in to comment.