Backed out changeset 9f805dc435b5 (bug 1839832) as requested by glandium for causing shippable build bustages. CLOSED TREE

This commit is contained in:
Stanca Serban 2023-07-25 04:13:29 +03:00
parent bc2d454559
commit fd0573c717
2 changed files with 3 additions and 15 deletions

View File

@ -79,16 +79,9 @@ def pgo_profile_path(path, pgo_use, profdata, build_env):
set_config("PGO_PROFILE_PATH", pgo_profile_path)
pgo_temporal = c_compiler.try_compile(
flags=["-fprofile-generate", "-mllvm", "-pgo-temporal-instrumentation"],
check_msg="whether the C compiler supports temporal instrumentation",
when="--enable-profile-generate",
)
@depends(c_compiler, pgo_profile_path, target_is_windows, pgo_temporal)
@depends(c_compiler, pgo_profile_path, target_is_windows)
@imports("multiprocessing")
def pgo_flags(compiler, profdata, target_is_windows, pgo_temporal):
def pgo_flags(compiler, profdata, target_is_windows):
if compiler.type == "gcc":
return namespace(
gen_cflags=["-fprofile-generate"],
@ -106,9 +99,6 @@ def pgo_flags(compiler, profdata, target_is_windows, pgo_temporal):
gen_ldflags = ["-fprofile-generate"]
gen_cflags = [prefix + "-fprofile-generate"]
if pgo_temporal:
gen_cflags += ["-mllvm", "-pgo-temporal-instrumentation"]
if target_is_windows:
# native llvm-profdata.exe on Windows can't read profile data
# if name compression is enabled (which cross-compiling enables

View File

@ -269,9 +269,7 @@ endif
# In PROFILE_GEN_CFLAGS, they look like "-mllvm foo", and we want "-C llvm-args=foo", so first turn
# "-mllvm foo" into "-mllvm:foo" so that it becomes a unique argument, that we can then filter for,
# excluding other flags, and then turn into the right string.
#
# Remove -mllvm -pgo-temporal-instrumentation as long as it's not supported by rustc.
rust_pgo_flags += $(patsubst -mllvm:%,-C llvm-args=%,$(filter-out -mllvm:-pgo-temporal-instrumentation,$(filter -mllvm:%,$(subst -mllvm ,-mllvm:,$(PROFILE_GEN_CFLAGS)))))
rust_pgo_flags += $(patsubst -mllvm:%,-C llvm-args=%,$(filter -mllvm:%,$(subst -mllvm ,-mllvm:,$(PROFILE_GEN_CFLAGS))))
else # MOZ_PROFILE_USE
rust_pgo_flags := -C profile-use=$(PGO_PROFILE_PATH)
endif