Bug 1476174 - Fix-up the change from
bug 1474024 to avoid creating lto object files in installed locations. r?build
--- a/config/config.mk
+++ b/config/config.mk
@@ -224,17 +224,17 @@ ifeq (Darwin,$(OS_TARGET))
# The macOS linker has however an option to explicitly keep those object
# files, which dsymutil will then find.
# The catch is that the linker uses sequential numbers for those object
# files, and doesn't avoid conflicts from multiple linkers running at
# the same time. So in directories with multiple binaries, object files
# from the first linked binaries would be overwritten by those of the
# last linked binary. So we use a subdirectory containing the name of the
# linked binary.
-LDFLAGS += -Wl,-object_path_lto,$@.lto.o/
+LDFLAGS += -Wl,-object_path_lto,$(@F).lto.o/
endif
endif
# We only add color flags if neither the flag to disable color
# (e.g. "-fno-color-diagnostics" nor a flag to control color
# (e.g. "-fcolor-diagnostics=never") is present.
define colorize_flags
ifeq (,$(filter $(COLOR_CFLAGS:-f%=-fno-%),$$(1))$(findstring $(COLOR_CFLAGS),$$(1)))