From fcaa2c82a607c412f08f46a6d762f578586881b3 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 9 Dec 2024 11:01:55 +0100 Subject: [PATCH] build: fix GN build on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use_gold is not defined on macOS. PR-URL: https://github.com/nodejs/node/pull/56141 Reviewed-By: Jake Yuesong Li Reviewed-By: Shelley Vohr Reviewed-By: Luigi Pinca Reviewed-By: Tierney Cyren Reviewed-By: Jason Zhang Reviewed-By: Juan José Arboleda --- unofficial.gni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial.gni b/unofficial.gni index 7c635322b770fa..7f34a0491b901b 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -263,7 +263,7 @@ template("node_gn_build") { ldflags = [ "/OPT:NOICF" ] # link.exe, but also lld-link.exe. } else if (is_apple && !use_lld) { ldflags = [ "-Wl,-no_deduplicate" ] # ld64. - } else if (use_gold || use_lld) { + } else if ((!is_apple && use_gold) || use_lld) { ldflags = [ "-Wl,--icf=none" ] } }