[llvm] 8e9622f - [cmake] Fix cmake warning in standalone compiler-rt builds.
Pierre Gousseau via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 01:50:07 PDT 2020
Author: Pierre Gousseau
Date: 2020-10-08T09:49:14+01:00
New Revision: 8e9622f96120842852f37bfaeea738b4b4ed5cb0
URL: https://github.com/llvm/llvm-project/commit/8e9622f96120842852f37bfaeea738b4b4ed5cb0
DIFF: https://github.com/llvm/llvm-project/commit/8e9622f96120842852f37bfaeea738b4b4ed5cb0.diff
LOG: [cmake] Fix cmake warning in standalone compiler-rt builds.
```
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
```
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D88957
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index e57abea42753..4e9b1f6c2332 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1494,6 +1494,7 @@ def relpath(p):\n
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}
More information about the llvm-commits
mailing list