[PATCH] D89985: [llvm-lit] Improve the error message when make_paths_relative() fails

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 14:06:53 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2488e444297f: [llvm-lit] Improve the error message when make_paths_relative() fails (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89985/new/

https://reviews.llvm.org/D89985

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ 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()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89985.301426.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201028/c65d7bc2/attachment.bin>


More information about the llvm-commits mailing list