[PATCH] D88957: [cmake] Fix cmake warning in standalone compiler-rt builds.

pierre gousseau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 04:51:33 PDT 2020


pgousseau created this revision.
pgousseau added reviewers: thakis, samsonov, filcab, gbedwell.
Herald added subscribers: llvm-commits, mgorny, dberris.
Herald added a project: LLVM.
pgousseau requested review of this revision.

LLVM_LIT_CONFIG_FILES is not defined in standalone compiler-rt builds, causing make_paths_relative to fail.

  cd compiler-rt/build
  cmake -G Ninja ../ -DCOMPILER_RT_STANDALONE_BUILD=ON -DLLVM_CONFIG_PATH=<...>llvm-project/build/bin/llvm-config -DCOMPILER_RT_INCLUDE_TESTS=ON

  -- check-shadowcallstack does nothing.
  Traceback (most recent call last):
    File "<string>", line 22, in <module>
  IndexError: list index out of range
  -- Configuring done
  -- Generating done


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88957

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -1494,6 +1494,7 @@
     if os.path.splitdrive(p)[0] != os.path.splitdrive(base)[0]: return p\n
     if haslink(p) or haslink(base): return p\n
     return os.path.relpath(p, base)\n
+if len(sys.argv) < 3: sys.exit(0)\n
 sys.stdout.write(';'.join(relpath(p) for p in sys.argv[2].split(';')))"
     ${basedir}
     ${pathlist_escaped}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88957.296642.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201007/addd6691/attachment.bin>


More information about the llvm-commits mailing list