(tool)
| 887 | # The directory where the binaries are produced. (relative to the installation |
| 888 | # root directory of the tool) |
| 889 | def llvm_build_bin_dir(tool): |
| 890 | build_dir = llvm_build_dir(tool) |
| 891 | if WINDOWS and 'Visual Studio' in CMAKE_GENERATOR: |
| 892 | old_llvm_bin_dir = os.path.join(build_dir, 'bin', decide_cmake_build_type(tool)) |
| 893 | |
| 894 | new_llvm_bin_dir = None |
| 895 | default_cmake_build_type = decide_cmake_build_type(tool) |
| 896 | cmake_build_types = [default_cmake_build_type, 'Release', 'RelWithDebInfo', 'MinSizeRel', 'Debug'] |
| 897 | for build_type in cmake_build_types: |
| 898 | d = os.path.join(build_dir, build_type, 'bin') |
| 899 | if os.path.isfile(os.path.join(tool.installation_path(), d, exe_suffix('clang'))): |
| 900 | new_llvm_bin_dir = d |
| 901 | break |
| 902 | |
| 903 | if new_llvm_bin_dir and os.path.exists(os.path.join(tool.installation_path(), new_llvm_bin_dir)): |
| 904 | return new_llvm_bin_dir |
| 905 | elif os.path.exists(os.path.join(tool.installation_path(), old_llvm_bin_dir)): |
| 906 | return old_llvm_bin_dir |
| 907 | return os.path.join(build_dir, default_cmake_build_type, 'bin') |
| 908 | else: |
| 909 | return os.path.join(build_dir, 'bin') |
| 910 | |
| 911 | |
| 912 | def build_env(): |
no test coverage detected