andrewng added a comment.

The following patch fixes my issues on Windows, but I haven't tested that it 
doesn't break anything else:

  diff --git a/llvm/cmake/modules/AddLLVM.cmake 
b/llvm/cmake/modules/AddLLVM.cmake
  index 91bec7d8081..f630af211fd 100644
  --- a/llvm/cmake/modules/AddLLVM.cmake
  +++ b/llvm/cmake/modules/AddLLVM.cmake
  @@ -1495,7 +1495,7 @@ function(configure_lit_site_cfg site_in site_out)
       string(REPLACE ";" "\\;" ARG_PATH_VALUES_ESCAPED "${ARG_PATH_VALUES}")
       get_filename_component(OUTPUT_DIR ${site_out} DIRECTORY)
       execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
  -      "import os, sys; sys.stdout.write(';'.join(os.path.relpath(p, 
sys.argv[1]).replace(os.sep, '/') if p else '' for p in 
sys.argv[2].split(';')))"
  +      "import os, sys; drive = os.path.splitdrive(sys.argv[1])[0]; 
sys.stdout.write(';'.join('' if not p else p if os.path.splitdrive(p)[0] != 
drive else os.path.relpath(p, sys.argv[1]).replace(os.sep, '/') for p in 
sys.argv[2].split(';')))"
         ${OUTPUT_DIR}
         ${ARG_PATH_VALUES_ESCAPED}
         OUTPUT_VARIABLE ARG_PATH_VALUES_RELATIVE)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77184



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to