From 395abf56204ab8feabb0e3616cf6c9f2516d9188 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Mon, 22 May 2023 13:00:45 +0200 Subject: [PATCH] fix: linker error missing `uv__strtok` (#38382) fix: linker error missing uv__strtok This symbol is referenced inside what seems to be dead code in `uv__search_path` in third_party/electron_node/deps/uv/src/unix/core.c When compiling in LTO mode, the reference is removed, but not during a non-LTO build. --- patches/node/build_add_gn_build_files.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 923e5fc987c6..8f8624a815f7 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -1012,10 +1012,10 @@ index 0000000000000000000000000000000000000000..bfbd4e656db1a6c73048443f96f1d576 +} diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..d6bed57461820ce08391fc424a1f842bd282fa75 +index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e546b39ef --- /dev/null +++ b/deps/uv/BUILD.gn -@@ -0,0 +1,196 @@ +@@ -0,0 +1,198 @@ +config("libuv_config") { + include_dirs = [ "include" ] + @@ -1085,6 +1085,8 @@ index 0000000000000000000000000000000000000000..d6bed57461820ce08391fc424a1f842b + "src/random.c", + "src/strscpy.c", + "src/strscpy.h", ++ "src/strtok.c", ++ "src/strtok.h", + "src/threadpool.c", + "src/timer.c", + "src/uv-common.c",