Bug 1841568 - Ensure at least one relative relocation is emitted during the -z pack-relative-relocs check. r=firefox-build-system-reviewers,sergesanspaille

Differential Revision: https://phabricator.services.mozilla.com/D182692
This commit is contained in:
Mike Hommey 2023-07-05 07:51:16 +00:00
Родитель eada0e7fc8
Коммит fc50a4caba
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -1605,7 +1605,10 @@ with only_when("--enable-compile-environment"):
configure_cache,
[c_compiler.compiler] + c_compiler.flags,
c_compiler.language,
"int main() { return 0; }",
# The resulting binary is expected to have relative
# relocations, the `ptr` variable attempts to ensure
# there is at least one.
"int main() { return 0; }\nint (*ptr)() = main;",
pack_rel_relocs
+ ["-o", path]
+ (extra_toolchain_flags or [])