Unable to build compiler-rt (Windows)

Hi,

As it stands, I cannot build nor test compiler-rt. I downloaded the latest sources from svn (http://llvm.org/svn/llvm-project/compiler-rt/trunk) and ran
cmake …/…/Source/compiler-rt -G"MinGW Makefiles"

and got the following error:

– Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:10 (include):
include could not find load file:
LLVMParseArguments
CMake Error at lib/CMakeLists.txt:4 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
CMake Error at lib/CMakeLists.txt:19 (set_target_properties):
set_target_properties called with incorrect number of arguments.
Call Stack (most recent call first):
lib/asan/CMakeLists.txt:77 (add_clang_runtime_static_library)
CMake Error at lib/asan/lit_tests/CMakeLists.txt:1 (configure_lit_site_cfg):
Unknown CMake command “configure_lit_site_cfg”.
– Configuring incomplete, errors occurred!

I also tried placing it inside the LLVM tree in the “projects” subdir, to no avail (same error). Adding
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake/Modules)
at the top of the file, got rid of the first, not the subsequent errors.

The project is disabled in projects/CMakeLists.txt, so that probably doesn’t work either.

Is there any solution available?

Thanks,

Ruben

PS: please reply to my email address as well, I am not subscribed to llvmdev.

于 2012/8/3 17:44, Ruben Van Boxem 写道:

Hi,

As it stands, I cannot build nor test compiler-rt. I downloaded the latest sources from svn (http://llvm.org/svn/llvm-project/compiler-rt/trunk) and ran
cmake ../../Source/compiler-rt -G"MinGW Makefiles"

and got the following error:
...
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:10 (include):
  include could not find load file:
    LLVMParseArguments
CMake Error at lib/CMakeLists.txt:4 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
CMake Error at lib/CMakeLists.txt:19 (set_target_properties):
  set_target_properties called with incorrect number of arguments.
Call Stack (most recent call first):
  lib/asan/CMakeLists.txt:77 (add_clang_runtime_static_library)
CMake Error at lib/asan/lit_tests/CMakeLists.txt:1 (configure_lit_site_cfg):
  Unknown CMake command "configure_lit_site_cfg".
-- Configuring incomplete, errors occurred!

I also tried placing it inside the LLVM tree in the "projects" subdir, to no avail (same error). Adding
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake/Modules)
at the top of the file, got rid of the first, not the subsequent errors.

The project is disabled in projects/CMakeLists.txt, so that probably doesn't work either.

Is there any solution available?

Thanks,

Ruben

PS: please reply to my email address as well, I am not subscribed to llvmdev.

Can you try to use ./configure directly?

2012/8/3 xunxun <xunxun1982@gmail.com>

于 2012/8/3 17:44, Ruben Van Boxem 写道:

Hi,

As it stands, I cannot build nor test compiler-rt. I downloaded the latest sources from svn (http://llvm.org/svn/llvm-project/compiler-rt/trunk) and ran
cmake …/…/Source/compiler-rt -G"MinGW Makefiles"

and got the following error:

– Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:10 (include):
include could not find load file:
LLVMParseArguments
CMake Error at lib/CMakeLists.txt:4 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
CMake Error at lib/CMakeLists.txt:19 (set_target_properties):
set_target_properties called with incorrect number of arguments.
Call Stack (most recent call first):
lib/asan/CMakeLists.txt:77 (add_clang_runtime_static_library)
CMake Error at lib/asan/lit_tests/CMakeLists.txt:1 (configure_lit_site_cfg):
Unknown CMake command “configure_lit_site_cfg”.
– Configuring incomplete, errors occurred!

I also tried placing it inside the LLVM tree in the “projects” subdir, to no avail (same error). Adding
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/…/…/cmake/Modules)
at the top of the file, got rid of the first, not the subsequent errors.

The project is disabled in projects/CMakeLists.txt, so that probably doesn’t work either.

Is there any solution available?

Thanks,

Ruben

PS: please reply to my email address as well, I am not subscribed to llvmdev.

Can you try to use ./configure directly?

Do you mean LLVM configure? Because compiler-rt has no “configure” script, so I doubt LLVM would pick up on that. Besides, compiler-rt is a seperate project, like Clang and lld, it should be able to build by itself (perhaps dependent on LLVM libs, like Clang and lld).

Ruben

Yes. But I remembered it can also support build the solo project. For example, make clang, Similarly, make compiler-rt But I forgot his makefile’s name, you can check it. I remembered Clang contained compiler-rt, at least in 3.0