Configuring compiler-rt fails when C compiler path contains spaces
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The following error is emitted during configuration:
```
CMake Error at cmake/Modules/CheckSectionExists.cmake:72 (message):
Call Stack (most recent call first):
lib/builtins/CMakeLists.txt:1025 (check_section_exists)
```
This occurs because all spaces in `test_compile_command` are replaced with `;` [here](https://github.com/llvm/llvm-project/blob/6b040b0dee9cb8b38e56dbcb7e51182a62703e05/compiler-rt/cmake/Modules/CheckSectionExists.cmake#L61). It breaks the build with a default installation of LLVM on Windows (install path `C:\Program Files\LLVM`).
Contributor guide
Research direction
Start in compiler-rt/cmake/Modules/CheckSectionExists.cmake around line 61, then follow its call from lib/builtins/CMakeLists.txt:1025. Reproduce configuration with an LLVM installation under C:\Program Files\LLVM and inspect how test_compile_command is handled. Done means configuration completes without the reported error when the compiler path contains spaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100