[LLVMdev] Building Compiler-RT on Windows

Saleem Abdulrasool compnerd at compnerd.org
Sat Feb 28 12:47:52 PST 2015


On Thu, Feb 26, 2015 at 9:39 AM, Daniel Dilts <diltsman at gmail.com> wrote:

> I am attempting to build for bare-metal ARM.
>

I found that cross-compiling compiler-rt was best achieved by either using
the Make based build, or by writing your own CMakeList.txt outside of the
included build system.  Note that you will need a sys root if you are
trying to build the sanitizers or the profiler.


> On Wed, Feb 25, 2015 at 9:13 PM, Saleem Abdulrasool <compnerd at compnerd.org
> > wrote:
>
>>
>>
>> On Fri, Feb 20, 2015 at 12:54 PM, Timur Iskhodzhanov <timurrrr at google.com
>> > wrote:
>>
>>> [+Saleem]
>>>
>>>
>>> On Fri Feb 20 2015 at 10:31:04 PM Daniel Dilts <diltsman at gmail.com>
>>> wrote:
>>>
>>>> I am using CMake 3.1.2.
>>>>
>>>> On Fri, Feb 20, 2015 at 10:00 AM, Alexey Samsonov <vonosmas at gmail.com>
>>>> wrote:
>>>>
>>>>> It looks like your command fails early in CMake TryCompile tests. Does
>>>>> (your version of) CMake supports using Clang on Windows at all?
>>>>>
>>>>> On Fri, Feb 20, 2015 at 7:02 AM, Daniel Dilts <diltsman at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Has anyone built Compiler-RT on Windows?  I am attempting to compile
>>>>>> it for ARM, but I get errors from CMake.  It appears to be trying to pass
>>>>>> VC++ flags to Clang.  I am using a version of Clang built from trunk.
>>>>>>
>>>>>
>> This is unclear to me.  Are you trying to build it for Windows ARM?  Or
>> some other ARM environment?
>>
>>
>>>
>>>>>>
>>>>>> PS D:\llvm\arm_test\compiler-rt-build> cmake -G Ninja
>>>>>> -DCMAKE_C_COMPILER=clang.exe -DCMAKE_CXX_COMPILER=clang++.exe -DCM
>>>>>> AKE_RC_COMPILER=rc.exe -DCMAKE_CXX_FLAGS="" -DCMAKE_C_FLAGS=""
>>>>>> ..\compiler-rt
>>>>>> -- The C compiler identification is Clang 3.7.0
>>>>>> clang.exe: error: no such file or directory: '/nologo'
>>>>>> clang.exe: error: no such file or directory: '/showIncludes'
>>>>>> -- The CXX compiler identification is Clang 3.7.0
>>>>>> clang.exe: error: no such file or directory: '/nologo'
>>>>>> clang.exe: error: no such file or directory: '/showIncludes'
>>>>>> -- Check for working C compiler using: Ninja
>>>>>> -- Check for working C compiler using: Ninja -- broken
>>>>>> CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.1/
>>>>>> Modules/CMakeTestCCompiler.cmake:61 (message):
>>>>>>   The C compiler "d:/llvm/build/Release/bin/clang.exe" is not able
>>>>>> to compile
>>>>>>   a simple test program.
>>>>>>   It fails with the following output:
>>>>>>    Change Dir: D:/llvm/arm_test/compiler-rt-build/CMakeFiles/CMakeTmp
>>>>>>
>>>>>>   Run Build Command:"d:/llvm/ninja/ninja.exe"
>>>>>> "cmTryCompileExec2171879632"
>>>>>>   [1/2] Building C object
>>>>>>   CMakeFiles\cmTryCompileExec2171879632.dir\testCCompiler.c.obj
>>>>>>   FAILED: d:\llvm\build\Release\bin\clang.exe /nologo /D_DEBUG /MDd
>>>>>> /Zi /Ob0
>>>>>>   /Od /RTC1 /showIncludes
>>>>>>   /FoCMakeFiles\cmTryCompileExec2171879632.dir\testCCompiler.c.obj
>>>>>>   /FdCMakeFiles\cmTryCompileExec2171879632.dir\ -c testCCompiler.c
>>>>>>   clang.exe: error: no such file or directory: '/nologo'
>>>>>>   clang.exe: error: no such file or directory: '/D_DEBUG'
>>>>>>   clang.exe: error: no such file or directory: '/MDd'
>>>>>>   clang.exe: error: no such file or directory: '/Zi'
>>>>>>   clang.exe: error: no such file or directory: '/Ob0'
>>>>>>   clang.exe: error: no such file or directory: '/Od'
>>>>>>   clang.exe: error: no such file or directory: '/RTC1'
>>>>>>   clang.exe: error: no such file or directory: '/showIncludes'
>>>>>>   clang.exe: error: no such file or directory:
>>>>>>   '/FoCMakeFiles\cmTryCompileExec2171879632.dir\testCCompiler.c.obj'
>>>>>>   clang.exe: error: no such file or directory:
>>>>>>   '/FdCMakeFiles\cmTryCompileExec2171879632.dir\'
>>>>>>   ninja: build stopped: subcommand failed.
>>>>>>
>>>>>>
>>>>>>   CMake will not be able to correctly generate this project.
>>>>>> Call Stack (most recent call first):
>>>>>>   CMakeLists.txt:12 (project)
>>>>>>
>>>>>> -- Configuring incomplete, errors occurred!
>>>>>> See also "D:/llvm/arm_test/compiler-rt-build/CMakeFiles/CMakeOutput.
>>>>>> log".
>>>>>> See also "D:/llvm/arm_test/compiler-rt-build/CMakeFiles/CMakeError.
>>>>>> log".
>>>>>>
>>>>>> _______________________________________________
>>>>>> LLVM Developers mailing list
>>>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Alexey Samsonov
>>>>> vonosmas at gmail.com
>>>>>
>>>>
>>>>
>>
>>
>> --
>> Saleem Abdulrasool
>> compnerd (at) compnerd (dot) org
>>
>
>


-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150228/4b7d053d/attachment.html>


More information about the llvm-dev mailing list