mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1555346 - require llvm-profdata when using pgo with clang{,-cl}; r=dmajor
Detecting problems earlier is better than detecting them later. Differential Revision: https://phabricator.services.mozilla.com/D33013 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e91a47c0f3
commit
74a42ff95b
@ -125,10 +125,11 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False,
|
||||
# Trick to make a @depends function out of an immediate value.
|
||||
progs = dependable(progs)
|
||||
paths = dependable(paths)
|
||||
allow_missing = dependable(allow_missing)
|
||||
|
||||
@depends_if(input, progs, paths, when=when)
|
||||
@depends_if(input, progs, paths, allow_missing, when=when)
|
||||
@checking('for %s' % what, lambda x: quote(x) if x else 'not found')
|
||||
def check(value, progs, paths):
|
||||
def check(value, progs, paths, allow_missing):
|
||||
if progs is None:
|
||||
progs = ()
|
||||
|
||||
|
@ -1456,8 +1456,18 @@ include('windows.configure', when=is_windows)
|
||||
|
||||
# PGO
|
||||
# ==============================================================
|
||||
llvm_profdata = check_prog('LLVM_PROFDATA', ['llvm-profdata'],
|
||||
allow_missing=True,
|
||||
@depends('MOZ_PGO', c_compiler)
|
||||
def allow_missing_llvm_profdata(pgo, compiler):
|
||||
if not pgo:
|
||||
return True
|
||||
|
||||
if compiler.type in ('clang', 'clang-cl'):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
llvm_profdata = check_prog('LLVM_PROFDATA', ['llvm-profdata'], what='llvm-profdata',
|
||||
allow_missing=allow_missing_llvm_profdata,
|
||||
paths=toolchain_search_path)
|
||||
|
||||
js_option('--enable-profile-generate',
|
||||
|
Loading…
Reference in New Issue
Block a user