Skip to content

Commit

Permalink
Always build two recursive libraries in FAT_OBJECT()
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
georgthegreat committed Feb 14, 2025
1 parent 8cad053 commit 6a356f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
16 changes: 1 addition & 15 deletions build/conf/linkers/ld.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions build/conf/linkers/msvc_linker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down

0 comments on commit 6a356f3

Please sign in to comment.