Bug 1635933 - Temporarily disable new pass manager on ubsan clang-10 r=froydnj

ubsan's generated code trips an optimization corner case in clang 10. This is a short-term workaround. In the best case, llvm.org/pr45835 will land a fix soon, and we can merge that for our clang-10 update and not even land this patch. However, in case we're living in anything other than the best case world, I don't want to block on that happening.

Differential Revision: https://phabricator.services.mozilla.com/D74727
This commit is contained in:
David Major 2020-05-12 18:01:48 +00:00
Родитель f5ddf2c2d3
Коммит 26568e980b
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -31,9 +31,10 @@ set_config('MOZ_RUST_DEFAULT_FLAGS', rust_flags)
js_option('--disable-new-pass-manager',
help='Use the legacy LLVM pass manager in clang builds')
@depends('--enable-new-pass-manager', c_compiler, host, target, 'MOZ_PGO', lto.enabled,
enable_fuzzing)
def new_pass_manager_flags(enabled, compiler, host, target, pgo, lto, enable_fuzzing):
@depends('--enable-new-pass-manager', c_compiler, host, target, 'MOZ_PGO',
lto.enabled, enable_fuzzing, ubsan)
def new_pass_manager_flags(enabled, compiler, host, target, pgo, lto,
enable_fuzzing, ubsan):
if host.os == 'OSX':
# Some native Mac builds hang with the new pass manager. Given the
# inability to test in CI, don't take the risk of further breakage.
@ -51,6 +52,10 @@ def new_pass_manager_flags(enabled, compiler, host, target, pgo, lto, enable_fuz
if enable_fuzzing and compiler.version < '10.0.0':
# Clang 9 does not seem to play well with libFuzzer
return None
if ubsan and compiler.version >= '10.0.0':
# Temporary until https://bugs.llvm.org/show_bug.cgi?id=45835 gets a
# real fix: clang 10 hangs with some ubsan-inserted code constructs.
return None
if enabled and compiler.version >= '9.0.0':
if compiler.type == 'clang':
return ['-fexperimental-new-pass-manager']