Bug 1476174 - Fix-up the change from bug 1474024 to avoid creating lto object files in installed locations. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 17 Jul 2018 11:29:49 +0900
changeset 819076 5a2f56f30f61639c1fa6e3b1e7dec4eb782d0f15
parent 819075 a6635f206392c19ba41ba58aa3630b03a441f6af
push id116431
push userbmo:mh+mozilla@glandium.org
push dateTue, 17 Jul 2018 04:11:06 +0000
reviewersbuild
bugs1476174, 1474024
milestone63.0a1
Bug 1476174 - Fix-up the change from bug 1474024 to avoid creating lto object files in installed locations. r?build
config/config.mk
--- 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)))