diff --git a/cmake/Modules/FindLLVM.cmake b/cmake/Modules/FindLLVM.cmake index 4383fac5..72b389fb 100644 --- a/cmake/Modules/FindLLVM.cmake +++ b/cmake/Modules/FindLLVM.cmake @@ -24,10 +24,15 @@ # Try suffixed versions to pick up the newest LLVM install available on Debian # derivatives. +# We also want an user-specified LLVM_ROOT_DIR to take precedence over the +# system default locations such as /usr/local/bin. Executing find_program() +# multiples times is the approach recommended in the docs. +set(llvm_config_names llvm-config-3.3 llvm-config-3.2 llvm-config-3.1 llvm-config) find_program(LLVM_CONFIG - NAMES llvm-config-3.3 llvm-config-3.2 llvm-config-3.1 llvm-config - PATHS ${LLVM_ROOT_DIR}/bin + NAMES ${llvm_config_names} + PATHS ${LLVM_ROOT_DIR}/bin NO_DEFAULT_PATH DOC "Path to llvm-config tool.") +find_program(LLVM_CONFIG NAMES ${llvm_config_names}) if (NOT LLVM_CONFIG) if (WIN32) diff --git a/runtime/phobos b/runtime/phobos index 4d8ca340..8f636073 160000 --- a/runtime/phobos +++ b/runtime/phobos @@ -1 +1 @@ -Subproject commit 4d8ca34057c8bdf7f3705f6c5c16922cae080dfb +Subproject commit 8f636073a3c0bc6d693600ad6d187faca620f224