From 6a356f38f861f298b8a0532f0c6e1b3cb5ca73d3 Mon Sep 17 00:00:00 2001 From: thegeorg Date: Fri, 14 Feb 2025 08:02:15 +0300 Subject: [PATCH] Always build two recursive libraries in FAT_OBJECT() `PACK_GLOBALS_IN_LIBRARY()` is actually already enabled in every module. Get rid of the macro and drop the customization which is hardly needed. commit_hash:552b7aea9c6df9f16e1281cbca7f47820ae54f6f --- build/conf/linkers/ld.conf | 16 +--------------- build/conf/linkers/msvc_linker.conf | 4 ---- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf index fecd6699c..a28df54a2 100644 --- a/build/conf/linkers/ld.conf +++ b/build/conf/linkers/ld.conf @@ -369,23 +369,9 @@ _LD_LINK_FAT_PREFIX=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $YMAKE_PYTHON _LD_LINK_FAT_SRCS_GLOBALS_WA=$_LD_SRCS_GLOBALS _LD_LINK_FAT_SRCS_GLOBALS_NO_WA=${rootrel;ext=.a:SRCS_GLOBAL} ${rootrel;ext=.o:SRCS_GLOBAL} -macro _FAT_OBJECT_ARGS_BASE(Flag, Lib) { - .CMD=$Flag=$Lib -} - -# FIXME: pre=lib here is weird legacy -_FAT_OBJECT_ARGS=--obj=${output;pre=lib;suf=.o:REALPRJNAME} +_FAT_OBJECT_ARGS=--globals-lib=${output;pre=$MODULE_PREFIX;suf=.globals.a:REALPRJNAME} _LD_LINK_FAT_SRCS_GLOBALS=$_LD_LINK_FAT_SRCS_GLOBALS_WA -macro PACK_GLOBALS_IN_LIBRARY() { - SET(_FAT_OBJECT_ARGS $_FAT_OBJECT_ARGS_BASE(--globals-lib, \${output;pre=$MODULE_PREFIX;suf=.globals.a:REALPRJNAME})) -} - -when ($OS_ANDROID == "yes") { - _FAT_OBJECT_ARGS= - _LD_LINK_FAT_SRCS_GLOBALS=$_LD_LINK_FAT_SRCS_GLOBALS_NO_WA -} - _LD_LINK_FAT_SUFFIX1=$_LD_ARCH_FLAG \ -Ya,input $AUTO_INPUT $VCS_C_OBJ \ -Ya,global_srcs diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf index df638dc2d..8985ed761 100644 --- a/build/conf/linkers/msvc_linker.conf +++ b/build/conf/linkers/msvc_linker.conf @@ -244,10 +244,6 @@ LINK_EXEC_DYN_LIB_CMDLINE=\ LINK_EXEC_DYN_LIB=$LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) -macro PACK_GLOBALS_IN_LIBRARY() { - ENABLE(UNUSED_MACRO) -} - LINK_GLOBAL_FAT_OBJECT=\ ${TOOLCHAIN_ENV} \ ${cwd:ARCADIA_BUILD_ROOT} \