From 2546a232ab53f01b7987d243d6508e04d2012b71 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Tue, 29 Dec 2020 18:34:32 +0100 Subject: build_scripts: remove unused code The function was removed in 609b1cd7ab8514354c93249e8a295e5e907d8de9 because CMake is in charge of discovering the location via llvm-config. This removes the code and raise a OSError if LLVM/CLANG_INSTALL_DIR is not defined. Change-Id: Ifb74b9eb327518dbc7b114e6868b773f304a577e Reviewed-by: Friedemann Kleint (cherry picked from commit b3dd5989db62cbb18bb9eff2ff8bad29f0ccb5a3) Reviewed-by: Qt Cherry-pick Bot --- build_scripts/utils.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/build_scripts/utils.py b/build_scripts/utils.py index 8919cff75..767ed46af 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -676,14 +676,7 @@ def detect_clang(): source = 'CLANG_INSTALL_DIR' clang_dir = os.environ.get(source, None) if not clang_dir: - source = find_llvm_config() - try: - if source is not None: - output = run_process_output([source, '--prefix']) - if output: - clang_dir = output[0] - except OSError: - pass + raise OSError("clang not found") if clang_dir: arch = '64' if sys.maxsize > 2 ** 31 - 1 else '32' clang_dir = clang_dir.replace('_ARCH_', arch) -- cgit v1.2.3