Bug 1863441 - Don't filter out flags for debug info when building relrhack injected code. r=firefox-build-system-reviewers,sergesanspaille

When the injected code is used by elfhack, the debug info is thrown away
because elfhack doesn't know what to do with it, but in the case of
relrhack, the normal linker can handle it, so there's no reason not to
include the debug info anymore.

Differential Revision: https://phabricator.services.mozilla.com/D192904
This commit is contained in:
Mike Hommey 2023-11-09 00:01:25 +00:00
parent e32e90ef8a
commit a1295ac7c0

View file

@ -35,7 +35,10 @@ for v in ("OS_CPPFLAGS", "OS_CFLAGS", "DEBUG", "CLANG_PLUGIN", "OPTIMIZE", "FRAM
for flag in COMPILE_FLAGS[v]:
if flag == "-isystem":
flags.append("".join(COMPILE_FLAGS[v][idx : idx + 2]))
elif flag.startswith(("-m", "-I", "-isystem", "--sysroot=")) or flag == "-fPIC":
elif (
flag.startswith(("-g", "-m", "-I", "-isystem", "--sysroot="))
or flag == "-fPIC"
):
flags.append(flag)
idx += 1
COMPILE_FLAGS[v] = flags