Merge pull request #944 from alexcrichton/windows-slash

Fix web-sys build on some Windows builds
This commit is contained in:
Alex Crichton 2018-10-08 12:46:44 -07:00 committed by GitHub
commit 1410b5253d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -108,6 +108,7 @@ fn try_main() -> Result<(), failure::Error> {
let out_dir = env::var("OUT_DIR").context("reading OUT_DIR environment variable")?;
let out_file_path = path::Path::new(&out_dir).join("bindings.rs");
fs::write(&out_file_path, bindings).context("writing bindings to output file")?;
println!("cargo:rustc-env=BINDINGS={}", out_file_path.display());
// run rustfmt on the generated file - really handy for debugging
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");

View File

@ -27,4 +27,4 @@ pub fn window() -> Option<Window> {
js_sys::global().dyn_into::<Window>().ok()
}
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
include!(env!("BINDINGS"));