diff options
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/cli/build.rs b/cli/build.rs index f7efa8be7..d3f428c50 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -374,13 +374,16 @@ fn main() { panic!("Cross compiling with snapshot is not supported."); } - let symbols_path = std::path::Path::new("napi").join( - format!("generated_symbol_exports_list_{}.def", env::consts::OS).as_str(), - ) - .canonicalize() - .expect( - "Missing symbols list! Generate using tools/napi/generate_symbols_lists.js", - ); + let symbols_file_name = match env::consts::OS { + "android" => "generated_symbol_exports_list_linux.def".to_string(), + os => format!("generated_symbol_exports_list_{}.def", os), + }; + let symbols_path = std::path::Path::new("napi") + .join(symbols_file_name) + .canonicalize() + .expect( + "Missing symbols list! Generate using tools/napi/generate_symbols_lists.js", + ); #[cfg(target_os = "windows")] println!( @@ -413,6 +416,12 @@ fn main() { } } + #[cfg(target_os = "android")] + println!( + "cargo:rustc-link-arg-bin=deno=-Wl,--export-dynamic-symbol-list={}", + symbols_path.display() + ); + // To debug snapshot issues uncomment: // op_fetch_asset::trace_serializer(); |