Skip to content
Snippets Groups Projects
Commit 37d010b2 authored by Luca Barbato's avatar Luca Barbato Committed by Luca Barbato
Browse files

Unbreak non-x86_64

The rust compiler DCE works in a different way so conditionals on `cfg!`
should not be used if the code in the branches may not compile.

While at it move the `use` statements where they are needed to avoid
warnings.

Fix #657
parent 253691a0
No related branches found
No related tags found
Loading
...@@ -11,12 +11,12 @@ extern crate nasm_rs; ...@@ -11,12 +11,12 @@ extern crate nasm_rs;
use std::env; use std::env;
use std::fs; use std::fs;
use std::fs::File;
use std::io::Write;
use std::path::Path; use std::path::Path;
fn main() { fn main() {
if cfg!(target_arch = "x86_64") { #[cfg(target_arch = "x86_64")] {
use std::fs::File;
use std::io::Write;
let out_dir = env::var("OUT_DIR").unwrap(); let out_dir = env::var("OUT_DIR").unwrap();
{ {
let dest_path = Path::new(&out_dir).join("config.asm"); let dest_path = Path::new(&out_dir).join("config.asm");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment