From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- build/moz.configure/compile-checks.configure | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'build/moz.configure/compile-checks.configure') diff --git a/build/moz.configure/compile-checks.configure b/build/moz.configure/compile-checks.configure index a639a012f1..1dddc684da 100644 --- a/build/moz.configure/compile-checks.configure +++ b/build/moz.configure/compile-checks.configure @@ -436,6 +436,24 @@ def check_and_add_linker_flag(flag, compiler=None, when=None, check=True): ) +# Like the compilation checks above, but for linker optimization flags. +@dependable +def linker_optimize_flags(): + return namespace(ldflags=[]) + + +@template +def check_and_add_linker_optimize_flag(flag, compiler=None, when=None, check=True): + return check_and_add_flags( + flag, + linker_optimize_flags, + [flag], + when=when, + check=check, + mode="link", + ) + + # Add the given flag to the list of linker flags for the build. # - `flag` is the flag (e.g. -fno-sized-deallocation) # - `when` (optional) is a @depends function or option name conditioning -- cgit v1.2.3