This is an archive of the discontinued LLVM Phabricator instance.

[lld] Convert LLVM_CMAKE_PATH to a CMake path
ClosedPublic

Authored by isuruf on Sep 27 2019, 1:08 PM.

Details

Summary

Otherwise I get the following error on windows.

CMake Error at D:/bld/lld_1569206597988/work/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (set):
  Syntax error in cmake code at

    D:/bld/lld_1569206597988/work/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2

  when parsing string

    D:\bld\lld_1569206597988\_h_env\Library\lib\cmake\llvm

  Invalid character escape '\b'.


CMake Error at D:/bld/lld_1569206597988/_build_env/Library/share/cmake-3.15/Modules/CheckSymbolExists.cmake:100 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  D:/bld/lld_1569206597988/_build_env/Library/share/cmake-3.15/Modules/CheckSymbolExists.cmake:57 (__CHECK_SYMBOL_EXISTS_IMPL)
  D:/bld/lld_1569206597988/_h_env/Library/lib/cmake/llvm/HandleLLVMOptions.cmake:943 (check_symbol_exists)
  CMakeLists.txt:56 (include)

Diff Detail

Event Timeline

isuruf created this revision.Sep 27 2019, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2019, 1:08 PM

I've stumbled upon this same issue while attempting to build lld version 12.0.0 via CMake on Windows. After applying the diff locally, I can confirm that it resolves the CMake error. This revision was submitted over a year ago so I figured I'd ping and see if it can be reviewed and merged upstream.

Pinging this as it’s been a week, and also adding some reviewers based on CODE_OWNERS.txt as I noticed the initial revision has no reviewers assigned to it.

I'm not too familiar with the standalone build.. or with this cmake stuff. Would a similar patch also be needed for clang?

sbc100 accepted this revision.Apr 28 2021, 10:31 AM
This revision is now accepted and ready to land.Apr 28 2021, 10:31 AM
isuruf updated this revision to Diff 341263.Apr 28 2021, 10:41 AM

Update patch for monorepo

isuruf retitled this revision from Convert LLVM_CMAKE_PATH to a CMake path to [lld] Convert LLVM_CMAKE_PATH to a CMake path.Apr 28 2021, 10:50 AM

Is there a way to re-run the unit tests that are failing. I don't think they are related.

I can confirm the failures are unrelated -- the failing test in question appears to have been resolved in https://reviews.llvm.org/rG8a4ee3b39c149d6cf344f0804a572d5ff120bdff.

This revision was landed with ongoing or failed builds.May 5 2021, 1:43 PM
This revision was automatically updated to reflect the committed changes.