Skip to content

Commit

Permalink
Publish the new subarchitectures in lib.rs.
Browse files Browse the repository at this point in the history
And handle them in build.rs.

Fixes #53.
  • Loading branch information
sunfishcode committed Jun 3, 2020
1 parent a2d2be7 commit 37910eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::ArmArchitecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::X86_32Architecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::Mips32Architecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::Mips64Architecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::Riscv32Architecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::Riscv64Architecture::*;")?;
writeln!(out, "#[allow(unused_imports)]")?;
writeln!(out, "use crate::CustomVendor;")?;
writeln!(out)?;
writeln!(out, "/// The `Triple` of the current host.")?;
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ pub use self::host::HOST;
pub use self::parse_error::ParseError;
pub use self::targets::{
Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment,
OperatingSystem, Vendor,
Mips32Architecture, Mips64Architecture, OperatingSystem, Riscv32Architecture,
Riscv64Architecture, Vendor, X86_32Architecture,
};
pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple};

Expand Down

0 comments on commit 37910eb

Please sign in to comment.