Bug 1836369 - Only export XRE_GetBootstrap symbol from libxul r=glandium

Better control of the ABI has its own merit, but in that case, we
significantly shrink the amount of dynamic symbol, which in turns
reduces the size of the binary.

As this limits the exported symbol to one, there's no longer a risk to
conflict with libjs, so just remove the symbol versioning.

On linux64 opt build, this saves ~2.5MB on the installer size libxul.so

Do not apply this on Android as it's using some extra symbols from
libxul.

Exclude Android from the targets as it requires some extra symbols.

Differential Revision: https://phabricator.services.mozilla.com/D179806
This commit is contained in:
serge-sans-paille 2023-06-20 19:57:25 +00:00
Родитель dd6ef15900
Коммит afb505be6b
3 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -0,0 +1 @@
XRE_GetBootstrap

Просмотреть файл

@ -106,14 +106,8 @@ def Libxul(name, output_category=None):
if CONFIG["RUSTC_NATVIS_LDFLAGS"]:
LDFLAGS += CONFIG["RUSTC_NATVIS_LDFLAGS"]
if CONFIG["OS_ARCH"] == "Linux" and CONFIG["OS_TARGET"] != "Android":
GeneratedFile(
"symverscript",
script="/build/gen_symverscript.py",
inputs=["../symverscript.in"],
flags=["xul%s" % CONFIG["MOZILLA_SYMBOLVERSION"]],
)
SYMBOLS_FILE = "!symverscript"
if CONFIG["OS_TARGET"] != "Android" and name == "xul-real":
SYMBOLS_FILE = "../libxul.symbols"
# The real libxul definition is in ./build/moz.build, but we define a

Просмотреть файл

@ -1,4 +0,0 @@
#filter substitution
@VERSION@ {
global: *;
};