summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-11-10 11:09:06 -0600
committerGitHub <noreply@github.com>2017-11-10 11:09:06 -0600
commit433e9c050b2f5fd45a476a818f035b17b38f6b15 (patch)
tree5c1640197c0b17b890dc3c15bd7de1c9f01d5d69 /src/codegen/mod.rs
parentc54e64c5377d299d67b6a9f2d735ba49740a7ae6 (diff)
parenta6d45069ac01dc46e2c4267673cb77c51251fd3f (diff)
Auto merge of #1148 - roblabla:bugfix-unnecessaryWriteModeRustfmt, r=fitzgen
Remove unnecessary flag from rustfmt invocation From rustfmt docs, the --write-mode flag is unecessary when passing the flag to stdin. If we leave it there, rustfmt-nightly complains that it cannot find the file named --write-mode, so let's remove the flag. here's the logs when I leave the flag : ``` Error: file `--write-mode=display` does not exist Error { repr: Custom(Custom { kind: Other, error: StringError("Internal rustfmt error") }) } ``` <details> <summary>The build.rs : </summary> ```rust extern crate bindgen; use std::env; use std::path::PathBuf; fn main() { println!("cargo:rustc-link-lib=static=transistor.nro"); println!("cargo:rustc-link-search=native=libtransistor/build/lib"); let bindings = bindgen::Builder::default() .header("libtransistor/include/libtransistor/nx.h") // Don't use host headers, to make sure we're building against newlib .clang_arg("-nostdinc") // Include the newlib/transistor headers, and the clang builtin headers .clang_args(&["-isystem", "/usr/lib/clang/5.0.0/include"]) .clang_args(&["-isystem", "libtransistor/newlib/newlib/libc/include"]) .clang_args(&["-isystem", "libtransistor/newlib/newlib/libc/sys/switch/include"]) .clang_arg("-Ilibtransistor/include") // We don't need to define those types, rust has them already anyways. // Blacklisting avoids a bug in bindgen where it creates cyclic references // (pub type u8 = u8) .blacklist_type("u(8|16|32|64)") .rustfmt_bindings(true) .rustfmt_configuration_file(None) .generate() .expect("Unable to generate bindings"); let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); bindings .write_to_file(out_path.join("bindings.rs")) .expect("Couldn't write bindings!"); } ``` </details>
Diffstat (limited to 'src/codegen/mod.rs')
0 files changed, 0 insertions, 0 deletions