Skip to content

Commit

Permalink
Show the linker cmake is using (#104045)
Browse files Browse the repository at this point in the history
This adds some extra line to the messages that cmake prints out:

    -- The C compiler identification is Clang 18.1.6
    ...
    -- The linker identification is LLD 18.1.6 (compatible with GNU linkers)
    ...

This makes it easier to see which linker is being used by the runtime.
This is useful in debugging, specially in scenarios where we pick the
wrong linker and then produce a broken runtime (like
#43349), but have no quick way
to tell what linker was actually used.
  • Loading branch information
omajid authored Jun 27, 2024
1 parent 8909110 commit 2fc4bba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eng/native/configuretools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ if (NOT CLR_CMAKE_HOST_WIN32)
else(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_MACCATALYST)
set(LD_OSX 1)
endif()
string(STRIP "${ldVersionOutput}" ldVersionOutput)
message("-- The linker identification is ${ldVersionOutput}")
endif()

# This introspection depends on CMAKE_STRINGS, which is why it's in this file instead of configureplatform
Expand Down

0 comments on commit 2fc4bba

Please sign in to comment.