diff options
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/build.rs b/cli/build.rs index df4cd5917..aaa29a6d0 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -331,6 +331,21 @@ fn main() { if target != host { panic!("Cross compiling with snapshot is not supported."); } + + #[cfg(target_os = "windows")] + println!( + "cargo:rustc-link-arg-bin=deno=/DEF:{}", + std::path::Path::new("exports.def") + .canonicalize() + .expect( + "Missing exports.def! Generate using tools/napi/generate_link_win.js" + ) + .display(), + ); + + #[cfg(not(target_os = "windows"))] + println!("cargo:rustc-link-arg-bin=deno=-rdynamic"); + // To debug snapshot issues uncomment: // op_fetch_asset::trace_serializer(); |