The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15596 
====================================================================== 
Reported By:                Reid Kleckner
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15596
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-05-29 13:47 EDT
Last Modified:              2015-05-29 13:47 EDT
====================================================================== 
Summary:                    CMakeClDeps.cmake doesn't work if CC contains
arguments
Description: 
I am attempting to do a 32-bit self-host of clang on Windows with a 64-bit
clang-cl binary. By default, the 64-bit binary generates 64-bit code, so I need
to pass the -m32 flag to override that. I figured the most robust way to do this
is something like setting CC="clang-cl -m32" and running cmake.

This *almost* worked, but CMakeCLDeps.cmake runs CMAKE_C_COMPILER without the
flags present in CC, and the link failed. It's regex then matched the error
message from LINK, and I got this in rules.ninja:

msvc_deps_prefix = LINK : error LNK2001: 

CMakeClDeps.cmake doesn't actually need to do a link, so one easy workaround
would be to add /c to command line there. That's probably a good tweak in
general, since it saves an invocation of link.exe, and cuts down on moving
parts. :)

Aside from the workaround, is there a more canonical way that CMakeClDeps should
be invoking the compiler that includes flags from the CC env var?
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-05-29 13:47 Reid Kleckner  New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to