mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1516228 - Add a configure check for llvm-objdump. r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D17462
This commit is contained in:
parent
fcbc8b9cd2
commit
1ddf551764
@ -9,6 +9,9 @@ include('checks.configure')
|
||||
|
||||
# Make `toolkit` available when toolkit/moz.configure is not included.
|
||||
toolkit = dependable(None)
|
||||
# Likewise with `bindgen_config_paths` when
|
||||
# build/moz.configure/bindgen.configure is not included.
|
||||
bindgen_config_paths = dependable(None)
|
||||
|
||||
option(env='DIST', nargs=1, help='DIST directory')
|
||||
|
||||
|
@ -583,6 +583,29 @@ set_config('MAKENSISU_FLAGS', nsis_flags)
|
||||
|
||||
check_prog('7Z', ('7z', '7za'), allow_missing=True, when=target_is_windows)
|
||||
|
||||
|
||||
@depends(c_compiler, bindgen_config_paths)
|
||||
def llvm_objdump(c_compiler, bindgen_config_paths):
|
||||
clang = None
|
||||
if c_compiler and c_compiler.type == 'clang':
|
||||
clang = c_compiler.compiler
|
||||
elif c_compiler and c_compiler.type == 'clang-cl':
|
||||
clang = os.path.join(os.path.dirname(c_compiler.compiler), 'clang')
|
||||
elif bindgen_config_paths:
|
||||
clang = bindgen_config_paths.clang_path
|
||||
llvm_objdump = 'llvm-objdump'
|
||||
if clang:
|
||||
out = check_cmd_output(clang, '--print-prog-name=llvm-objdump',
|
||||
onerror=lambda: None)
|
||||
if out:
|
||||
llvm_objdump = out.rstrip()
|
||||
return (llvm_objdump,)
|
||||
|
||||
|
||||
check_prog('LLVM_OBJDUMP', llvm_objdump, what='llvm-objdump',
|
||||
when='--enable-compile-environment')
|
||||
|
||||
|
||||
# Please do not add configure checks from here on.
|
||||
|
||||
# Fallthrough to autoconf-based configure
|
||||
|
Loading…
Reference in New Issue
Block a user