mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1871386 - Move -Wl,-build-id check from old-configure to moz.configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D197069
This commit is contained in:
parent
1b9ef3e953
commit
bf2b4a82a9
@ -144,6 +144,25 @@ def file_prefix_map_flags(path_remapping, path_remappings, compiler):
|
||||
|
||||
set_config("MOZ_FILE_PREFIX_MAP_FLAGS", file_prefix_map_flags)
|
||||
|
||||
|
||||
@depends(c_compiler)
|
||||
def is_gnu_cc(c_compiler):
|
||||
return c_compiler.type != "clang-cl"
|
||||
|
||||
|
||||
@depends(developer_options, when=is_gnu_cc)
|
||||
def check_build_id_uuid(developer_options):
|
||||
return developer_options
|
||||
|
||||
|
||||
@depends(developer_options, when=is_gnu_cc)
|
||||
def check_build_id_sha1(developer_options):
|
||||
return not developer_options
|
||||
|
||||
|
||||
check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
|
||||
check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_uuid)
|
||||
|
||||
# Please keep these last in this file.
|
||||
add_old_configure_assignment("_COMPILATION_LDFLAGS", linker_flags.ldflags)
|
||||
add_old_configure_assignment("_COMPILATION_HOST_LDFLAGS", linker_flags.host_ldflags)
|
||||
|
@ -243,19 +243,6 @@ if test "$GNU_CC"; then
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
# While sha1 is deterministic, it is slower.
|
||||
if test -z "$DEVELOPER_OPTIONS"; then
|
||||
build_id=sha1
|
||||
else
|
||||
build_id=uuid
|
||||
fi
|
||||
AC_MSG_CHECKING([for --build-id=$build_id option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,--build-id=$build_id"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
_DEFINES_CFLAGS="-include $jsconfdefs -DMOZILLA_CLIENT"
|
||||
fi
|
||||
|
||||
|
@ -242,19 +242,6 @@ if test "$GNU_CC"; then
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
# While sha1 is deterministic, it is slower.
|
||||
if test -z "$DEVELOPER_OPTIONS"; then
|
||||
build_id=sha1
|
||||
else
|
||||
build_id=uuid
|
||||
fi
|
||||
AC_MSG_CHECKING([for --build-id=$build_id option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,--build-id=$build_id"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for --ignore-unresolved-symbol option to ld])
|
||||
HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
|
Loading…
Reference in New Issue
Block a user