View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015457 | CMake | (No Category) | public | 2015-03-18 14:37 | 2015-11-02 09:13 | ||||
Reporter | Reid Kleckner | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | no change required | ||||||
Platform | OS | Windows | OS Version | 7 | |||||
Product Version | CMake 3.2.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015457: ninja generator relinks all executables after incremental build in LLVM due to extra .lib output file | ||||||||
Description | Old versions of cmake would generate this ninja target: build bin\opt.exe: CXX_EXECUTABLE_LINKER ... Recent versions (3.2+) generate this target: build bin\opt.exe lib\opt.lib: CXX_EXECUTABLE_LINKER_RSP_FILE Since this is an executable, no .lib file should be generated, right? Why does the linker build rule even list the /implib flag? Maybe this is some functionality I'm unaware of, but so far as I can tell it is extraneous. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0038240) Reid Kleckner (reporter) 2015-03-18 14:48 |
Locally reverting ef42e57d470db499a41c8bca695391c3e3e5cb86 fixes my problem, FWIW. |
(0038241) Brad King (manager) 2015-03-18 15:07 |
Commit ef42e57d4 switched to using proper ninja build rule syntax for rules with multiple outputs. The import library is added for DLLs but also for executables with the ENABLE_EXPORTS property set. See use of cmTarget::HasImportLibrary: http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmNinjaNormalTargetGenerator.cxx;hb=v3.2.1#l532 [^] http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmTarget.cxx;hb=v3.2.1#l585 [^] Executable targets may set ENABLE_EXPORTS in order to really dllexport some symbols and provide an import library that plugins can link. In llvm: $ git grep ENABLE_EXPORTS -- tools tools/bugpoint/CMakeLists.txt:set_target_properties(bugpoint PROPERTIES ENABLE_EXPORTS 1) tools/llc/CMakeLists.txt:set_target_properties(llc PROPERTIES ENABLE_EXPORTS 1) tools/lli/CMakeLists.txt:set_target_properties(lli PROPERTIES ENABLE_EXPORTS 1) tools/llvm-stress/CMakeLists.txt:set_target_properties(llvm-stress PROPERTIES ENABLE_EXPORTS 1) tools/opt/CMakeLists.txt:set_target_properties(opt PROPERTIES ENABLE_EXPORTS 1) |
(0038244) Reid Kleckner (reporter) 2015-03-18 15:38 |
Huh, seems reasonable, but it seems like the linker command isn't generating any .lib anywhere. |
(0038245) Brad King (manager) 2015-03-18 15:45 |
Re 0015457:0038244: In order to produce the .lib then some of the executable's object files must have dllexport markup or a module definition file (.def) must be among the sources. It is the project's responsibility to do this or to not set ENABLE_EXPORTS (at least on Windows). |
(0038246) Reid Kleckner (reporter) 2015-03-18 15:51 |
Sounds right. I have a feeling this stuff was hacked up to work with binutils ld –-export-all-symbols, and not MSVC. We can fix this in LLVM then. |
(0038247) Brad King (manager) 2015-03-18 15:56 |
Okay, thanks. |
(0039737) Robert Maynard (manager) 2015-11-02 09:13 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-03-18 14:37 | Reid Kleckner | New Issue | |
2015-03-18 14:48 | Reid Kleckner | Note Added: 0038240 | |
2015-03-18 15:01 | Brad King | Assigned To | => Brad King |
2015-03-18 15:01 | Brad King | Status | new => assigned |
2015-03-18 15:01 | Brad King | Target Version | => CMake 3.3 |
2015-03-18 15:07 | Brad King | Note Added: 0038241 | |
2015-03-18 15:38 | Reid Kleckner | Note Added: 0038244 | |
2015-03-18 15:45 | Brad King | Note Added: 0038245 | |
2015-03-18 15:51 | Reid Kleckner | Note Added: 0038246 | |
2015-03-18 15:56 | Brad King | Note Added: 0038247 | |
2015-03-18 15:56 | Brad King | Status | assigned => resolved |
2015-03-18 15:56 | Brad King | Resolution | open => no change required |
2015-03-18 15:56 | Brad King | Target Version | CMake 3.3 => |
2015-11-02 09:13 | Robert Maynard | Note Added: 0039737 | |
2015-11-02 09:13 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |