Skip to content

Conversation

@DavidSpickett
Copy link
Collaborator

@DavidSpickett DavidSpickett commented Sep 24, 2024

The documentation tells you not to do this:
https://llvm.org/docs/CMake.html#llvm-related-variables

But until now we did not enforce it.

$ cmake ../llvm-project/llvm/ -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="pstl" -DLLVM_ENABLE_RUNTIMES="libcxx;pstl"
CMake Error at CMakeLists.txt:166 (message):
  Runtime project "pstl" found in LLVM_ENABLE_PROJECTS and
  LLVM_ENABLE_RUNTIMES.  It must only appear in one of them and that one
  should almost always be LLVM_ENABLE_RUNTIMES.

…M_ENABLE_RUNTIMES

The documentation tells you not to do this:
https://llvm.org/docs/CMake.html#llvm-related-variables

But until now we did not enforce it.

```
$ $ cmake ../llvm-project/llvm/ -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="pstl" -DLLVM_ENABLE_RUNTIMES="libcxx;pstl"
```
```
CMake Error at CMakeLists.txt:166 (message):
  Runtime project "pstl" found in LLVM_ENABLE_PROJECTS and
  LLVM_ENABLE_RUNTIMES.  It must only appear in one of them and that one
  should almost always be LLVM_ENABLE_RUNTIMES.
```
@DavidSpickett DavidSpickett merged commit 5a03823 into llvm:main Sep 25, 2024
9 checks passed
@DavidSpickett DavidSpickett deleted the llvm-cmake branch September 25, 2024 09:34
@jhuber6
Copy link
Contributor

jhuber6 commented Sep 25, 2024

If you use LLVM_ENABLE_RUNTIMES=libc in full build mode it will automatically put LLVM_ENABLE_PROJECTS=libc, we use this to bootstrap some libc specific utilities. This patch breaks any runtimes build of the libc project. See https://github.com/llvm/llvm-project/blob/main/llvm/CMakeLists.txt#L204.

@jhuber6
Copy link
Contributor

jhuber6 commented Sep 25, 2024

That being said I do think it's a good warning to have in general, since I've seen users attempt to set both unknowingly.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-win running on as-worker-93 while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1235

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM-Unit :: Support/./SupportTests.exe/35/87' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe-LLVM-Unit-15624-35-87.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=87 GTEST_SHARD_INDEX=35 C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe
--

Script:
--
C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe --gtest_filter=ProgramEnvTest.CreateProcessLongPath
--
C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(160): error: Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(163): error: fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied



C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:160
Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:163
fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied




********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants