[cmake-developers] [CMake 0016078]: CMake on Cygwin with clang not creating expected dll.a

Mantis Bug Tracker mantis at public.kitware.com
Sun Apr 24 04:28:49 EDT 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=16078 
====================================================================== 
Reported By:                Thomas Nilsson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16078
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-04-24 04:28 EDT
Last Modified:              2016-04-24 04:28 EDT
====================================================================== 
Summary:                    CMake on Cygwin with clang not creating expected
dll.a
Description: 
I'm building a shared library and an application using that lib on Cygwin. With
GCC CMake creates a .dll.a to use when linking. Switching to clang I get

[ 34%] Built target xyz_shared
make[2]: *** No rule to make target 'src/libxyz_shared.dll.a', needed by
'xyz.exe'.  Stop.


Steps to Reproduce: 
On Cygwin, use the attached CMakeLists.txt and see it produce
'cygxyz_shared.dll' and 'libxyz_shared.dll.a'.

Clear the build directory and do

  $ CC=clang cmake ..; make

and it will not create 'libxyz_shared.dll.a'.

Additional Information: 
As described in this Stackoverflow question
(http://stackoverflow.com/questions/36294199) the culprit seems to be the lack
of the flags '-Wl,--enable-auto-import' when using clang.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-04-24 04:28 Thomas Nilsson New Issue                                    
2016-04-24 04:28 Thomas Nilsson File Added: CMakeLists.txt                    
======================================================================



More information about the cmake-developers mailing list