From d2c8b5f0875c6c5ee7d99d2b2f487adf01a3b903 Mon Sep 17 00:00:00 2001 From: Luke Channings <461449+LukeChannings@users.noreply.github.com> Date: Sun, 16 Oct 2022 23:53:35 +0100 Subject: fix(build) fix linux symbols export list format (#16313) Fixes the error reported in #16304. > = note: /usr/bin/ld:/home/abotella/Projects/deno/cli/generated_symbol_exports_list_linux.def:1: syntax error in dynamic list collect2: error: ld returned 1 exit status This was caused by the format of the symbols list on Linux being malformed (as the error implies). The format is documented in ld's [VERSION](https://sourceware.org/binutils/docs/ld/VERSION.html) as well as: > --export-dynamic-symbol-list=file Specify a --export-dynamic-symbol for each pattern in the file. The format of the file is the same as the version node without scope and node name. See VERSION for more information. Previously, the format for the Linux symbols list was simply a list of symbols, now it follows the format: ``` { symbol_name_a; ...; symbol_name_z }; ``` --- cli/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cli/build.rs') diff --git a/cli/build.rs b/cli/build.rs index 98d044a3e..48af79101 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -333,7 +333,11 @@ fn main() { } let symbols_path = std::path::Path::new( - format!("generated_symbol_exports_list_{}.def", env::consts::OS).as_str(), + format!( + "napi_sym/generated_symbol_exports_list_{}.def", + env::consts::OS + ) + .as_str(), ) .canonicalize() .expect( -- cgit v1.2.3