# HG changeset patch # User Mike Hommey # Date 1549644973 0 # Fri Feb 08 16:56:13 2019 +0000 # Node ID 358cf23ac4482d01d80de12482cc40c58b0b144f # Parent e8da2b7b91b07a2753edf1a3e1b642519502e1be Bug 1526062 - Fix miscellaneous NameErrors lingering in the python configure code. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D19109 diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/android-ndk.configure --- a/build/moz.configure/android-ndk.configure +++ b/build/moz.configure/android-ndk.configure @@ -169,17 +169,17 @@ def android_toolchain(target, host, ndk, die('Target cpu is not supported.') toolchain_format = '%s/toolchains/%s-4.9/prebuilt/%s-%s' toolchain = toolchain_format % (ndk, target_base, host.kernel.lower(), host.cpu) log.debug('Trying %s' % quote(toolchain)) if not isdir(toolchain) and host.cpu == 'x86_64': - toolchain = toolchain_format % (ndk, target_base, version, + toolchain = toolchain_format % (ndk, target_base, host.kernel.lower(), 'x86') log.debug('Trying %s' % quote(toolchain)) if isdir(toolchain): return toolchain die('You have to specify --with-android-toolchain=' '/path/to/ndk/toolchain.') @@ -281,21 +281,20 @@ def bindgen_cflags_android(toolchain_fla @depends(host, ndk) @imports(_from='os.path', _import='exists') @imports(_from='os.path', _import='isdir') def android_clang_compiler(host, ndk): if not ndk: return - llvm_path = '%s/toolchains/llvm/prebuilt/%s-%s/bin' % (ndk, - host.kernel.lower(), - host.cpu) + llvm_format = '%s/toolchains/llvm/prebuilt/%s-%s/bin' + llvm_path = llvm_format % (ndk, host.kernel.lower(), host.cpu) if not isdir(llvm_path) and host.cpu == 'x86_64': - llvm_path = toolchain_format % (ndk, host.kernel.lower(), 'x86') + llvm_path = llvm_format % (ndk, host.kernel.lower(), 'x86') if not isdir(llvm_path): die("Couldn't find path to LLVM toolchain at %s" % llvm_path) clang = '%s/clang' % llvm_path if not exists(clang): die("Couln't find clang in LLVM toolchain at %s" % clang) diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure @@ -236,17 +236,17 @@ def rust_triple_alias(host_or_target): rust_target_triple = rust_triple_alias(target) rust_host_triple = rust_triple_alias(host) @depends(host, rust_host_triple, rustc_info.host) def validate_rust_host_triple(host, rust_host, rustc_host): if rust_host != rustc_host: if host.alias == rust_host: - configure_host = host_alias + configure_host = host.alias else: configure_host = '{}/{}'.format(host.alias, rust_host) die("The rust compiler host ({}) is not suitable for the configure host ({})." .format(rustc_host, configure_host)) set_config('RUST_TARGET', rust_target_triple) set_config('RUST_HOST_TARGET', rust_host_triple) diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure --- a/build/moz.configure/util.configure +++ b/build/moz.configure/util.configure @@ -219,17 +219,17 @@ def find_program(file, paths=None): @imports('subprocess') @imports(_from='mozbuild.configure.util', _import='LineIO') @imports(_from='tempfile', _import='mkstemp') def try_invoke_compiler(compiler, language, source, flags=None, onerror=None): flags = flags or [] if not isinstance(flags, (list, tuple)): die("Flags provided to try_compile must be a list of strings, " - "not %r", paths) + "not %r", flags) suffix = { 'C': '.c', 'C++': '.cpp', }[language] fd, path = mkstemp(prefix='conftest.', suffix=suffix) try: diff --git a/build/moz.configure/windows.configure b/build/moz.configure/windows.configure --- a/build/moz.configure/windows.configure +++ b/build/moz.configure/windows.configure @@ -261,17 +261,17 @@ def vc_path(c_compiler, toolchain_search if not vc_program: die('Cannot find a Visual C++ install for e.g. ATL headers.') result = os.path.dirname(vc_program) while True: next, p = os.path.split(result) if next == result: die('Cannot determine the Visual C++ directory the compiler (%s) ' - 'is in' % cl) + 'is in' % vc_program) result = next if p.lower() == 'bin': break return os.path.normpath(result) option(env='DIA_SDK_PATH', nargs=1, help='Path to the Debug Interface Access SDK')