BootRules: Add -fvisibility=hidden to BootStaticLibrary as well.

Does not seem to affect the size of the bios_ia32 loader,
but takes the x86_64 EFI loader down from 678k -> 554k.
This commit is contained in:
Augustin Cavalier
2022-09-29 10:09:00 -04:00
parent c2dcf10676
commit 5613c37e66
+9 -3
View File
@@ -182,13 +182,19 @@ rule BootMergeObject
rule BootStaticLibrary
{
# Usage BootStaticLibrary <name> : <sources> : <extra cc flags> ;
# BootStaticLibrary <name> : <sources> : <extra cc flags> ;
# This is designed to take a set of sources and libraries and create
# a file called lib<name>.a
# a static library.
local extraFlags = $(3) ;
TARGET_PACKAGING_ARCH on $(1) = $(TARGET_KERNEL_ARCH) ;
SetupBoot $(2) : $(3) : false ;
if $(TARGET_CC_IS_LEGACY_GCC_$(TARGET_KERNEL_ARCH)) = 0
&& [ on $(1) return $(NO_HIDDEN_VISIBILITY) ] != 1 {
extraFlags += -fvisibility=hidden ;
}
SetupBoot $(2) : $(extraFlags) : false ;
Library $(1) : $(2) ;
}