From 963e36eae808781dbded822efffc1ea6608911c9 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Wed, 14 Apr 2021 22:55:38 +0800 Subject: [PATCH] patches: disable LTO for ICU tools --- patches/node.v12.22.1.cpp.patch | 13 +++++++++++++ patches/node.v14.16.1.cpp.patch | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/patches/node.v12.22.1.cpp.patch b/patches/node.v12.22.1.cpp.patch index db05ef32..12e27b18 100644 --- a/patches/node.v12.22.1.cpp.patch +++ b/patches/node.v12.22.1.cpp.patch @@ -568,3 +568,16 @@ index 79a22ac0fa..cea46e2779 100644 'conditions': [ ['node_shared != "true"', { 'MSVC_runtimeType': 0 # MultiThreaded (/MT) +diff --git node/tools/icu/icu-generic.gyp node/tools/icu/icu-generic.gyp +index 680f8528df..ff5f7681b2 100644 +--- node/tools/icu/icu-generic.gyp ++++ node/tools/icu/icu-generic.gyp +@@ -52,7 +52,7 @@ + 'conditions': [ + [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { + 'cflags': [ '-Wno-deprecated-declarations', '-Wno-strict-aliasing' ], +- 'cflags_cc': [ '-frtti' ], ++ 'cflags_cc': [ '-frtti', '-fno-lto' ], + 'cflags_cc!': [ '-fno-rtti' ], + }], + [ 'OS == "mac" or OS == "ios"', { diff --git a/patches/node.v14.16.1.cpp.patch b/patches/node.v14.16.1.cpp.patch index b2bf8529..2a89c815 100644 --- a/patches/node.v14.16.1.cpp.patch +++ b/patches/node.v14.16.1.cpp.patch @@ -617,3 +617,16 @@ index 79a22ac0fa..cea46e2779 100644 'conditions': [ ['node_shared != "true"', { 'MSVC_runtimeType': 0 # MultiThreaded (/MT) +diff --git node/tools/icu/icu-generic.gyp node/tools/icu/icu-generic.gyp +index 680f8528df..ff5f7681b2 100644 +--- node/tools/icu/icu-generic.gyp ++++ node/tools/icu/icu-generic.gyp +@@ -52,7 +52,7 @@ + 'conditions': [ + [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { + 'cflags': [ '-Wno-deprecated-declarations', '-Wno-strict-aliasing' ], +- 'cflags_cc': [ '-frtti' ], ++ 'cflags_cc': [ '-frtti', '-fno-lto' ], + 'cflags_cc!': [ '-fno-rtti' ], + }], + [ 'OS == "mac" or OS == "ios"', {