diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -1500,7 +1500,12 @@ sys.stdout.write(';'.join(relpath(p) for p in sys.argv[2].split(';')))" ${basedir} ${pathlist_escaped} - OUTPUT_VARIABLE pathlist_relative) + OUTPUT_VARIABLE pathlist_relative + ERROR_VARIABLE error + RESULT_VARIABLE result) + if (NOT result EQUAL 0) + message(FATAL_ERROR "make_paths_relative() failed due to error '${result}', with stderr\n${error}") + endif() set(${out_pathlist} "${pathlist_relative}" PARENT_SCOPE) endfunction()