From c7c606a27fe3a20ead7e0d924558ed703bd70c97 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 5 Dec 2024 09:13:47 +0100 Subject: [PATCH] build: fix GN build on macOS use_gold is not defined on macOS. --- unofficial.gni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unofficial.gni b/unofficial.gni index 1caadb8834618d..445892483399aa 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" ] } }