Hello guys, So I downloaded the 3.9 release and thought my LTO nightmares were over but… cmake still isn’t using CMAKE_<LANG>_COMPILER_AR when linking on MSYS.
I’m using the « MSYS Makefiles » generator, and when building an executable it still uses the plain ar instead of gcc-ar… CMAKE_CXX_COMPILER_AR is correctly set to C:/msys64/mingw64/bin/gcc-ar.exe but won’t use it… I also tried to set CMAKE_AR to C:/msys64/mingw64/bin/gcc-ar.exe from cmake-gui but it’s not taken into account Here’s the output : [100%] Linking CXX executable BoilerPlate.exe "/C/Program Files/CMake/bin/cmake.exe" -E remove -f CMakeFiles/BoilerPlate.dir/objects.a /C/msys64/mingw64/bin/ar.exe cr CMakeFiles/BoilerPlate.dir/objects.a @CMakeFiles/BoilerPlate.dir/objects1.rsp C:\msys64\mingw64\bin\ar.exe: CMakeFiles/BoilerPlate.dir/source/main.cpp.obj: plugin needed to handle lto object /C/msys64/mingw64/bin/g++.exe -flto -fno-fat-lto-objects -Wl,--whole-archive CMakeFiles/BoilerPlate.dir/objects.a -Wl,--no-whole-archive -o BoilerPlate.exe -Wl,--out-implib,libBoilerPlate.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/BoilerPlate.dir/linklibs.rsp I’m not sure if it is a Windows/MSYS related problem (I think it is), but I really don’t understand why CMAKE wants to use C:/msys64/mingw64/bin/ar.exe so much and not the one in CMAKE_AR / CMAKE_CXX_COMPILER_AR… If you guys have any idea. Thanks, Lectem
-- 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