[Cmake-commits] CMake branch, next, updated. v3.8.0-rc4-659-g4787e33

Kitware Robot kwrobot at kitware.com
Mon Apr 3 13:35:02 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  4787e3319c5a23b8765d8125eaba1c85714c2fee (commit)
       via  53f17333f830d4f314bbe10ba32889bbcfbc3c46 (commit)
      from  f1b78a0c9faf963a332ea505adfc0b747e4631f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4787e3319c5a23b8765d8125eaba1c85714c2fee
commit 4787e3319c5a23b8765d8125eaba1c85714c2fee
Merge: f1b78a0 53f1733
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 3 17:27:09 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Apr 3 13:27:16 2017 -0400

    Stage topic 'mac-implicit-link-no-lto-flag'
    
    Topic-id: 23456
    Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/658


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53f17333f830d4f314bbe10ba32889bbcfbc3c46
commit 53f17333f830d4f314bbe10ba32889bbcfbc3c46
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 3 13:19:52 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Apr 3 13:23:31 2017 -0400

    CMakeParseImplicitLinkInfo: Ignore ld -lto_library flag
    
    The `ld` tool in Xcode 8.3 now has a `-lto_library <path>` flag.  Ignore
    the flag instead of accidentally parsing it as `-l` with `to_library`.
    
    Fixes: #16766

diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 3469d34..3273443 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -49,8 +49,12 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
     if("${cmd}" MATCHES "${linker_regex}")
       string(APPEND log "  link line: [${line}]\n")
       string(REGEX REPLACE ";-([LYz]);" ";-\\1" args "${args}")
+      set(skip_value_of "")
       foreach(arg IN LISTS args)
-        if("${arg}" MATCHES "^-L(.:)?[/\\]")
+        if(skip_value_of)
+          string(APPEND log "    arg [${arg}] ==> skip value of ${skip_value_of}\n")
+          set(skip_value_of "")
+        elseif("${arg}" MATCHES "^-L(.:)?[/\\]")
           # Unix search path.
           string(REGEX REPLACE "^-L" "" dir "${arg}")
           list(APPEND implicit_dirs_tmp ${dir})
@@ -66,6 +70,10 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
           set(lib "${CMAKE_MATCH_1}")
           list(APPEND implicit_libs_tmp ${lib})
           string(APPEND log "    arg [${arg}] ==> lib [${lib}]\n")
+        elseif("${arg}" STREQUAL "-lto_library")
+          # ld argument "-lto_library <path>"
+          set(skip_value_of "${arg}")
+          string(APPEND log "    arg [${arg}] ==> ignore, skip following value\n")
         elseif("${arg}" MATCHES "^-l([^:].*)$")
           # Unix library.
           set(lib "${CMAKE_MATCH_1}")
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
index d6d2357..58e2bf9 100644
--- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -261,6 +261,12 @@ set(mac_absoft_libs "af90math;afio;amisc;absoftmain;af77math;m;mv")
 set(mac_absoft_dirs "/Applications/Absoft11.1/lib;/usr/lib/i686-apple-darwin10/4.2.1;/usr/lib/gcc/i686-apple-darwin10/4.2.1;/usr/lib")
 list(APPEND platforms mac_absoft)
 
+# Xcode 8.3: clang++ dummy.cpp -v
+set(mac_clang_v_text " \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld\" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.12.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -o a.out /var/folders/hc/95l7dhnx459c57g4yg_6yd8c0000gp/T/dummy-384ea1.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a")
+set(mac_clang_v_libs "c++")
+set(mac_clang_v_dirs "")
+list(APPEND platforms mac_clang_v)
+
 #-----------------------------------------------------------------------------
 # Sun
 

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeParseImplicitLinkInfo.cmake       |   10 +++++++++-
 Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in |    6 ++++++
 2 files changed, 15 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list