[all-commits] [llvm/llvm-project] bcf98b: llvm-shlib: Fix libLLVM-${MAJOR}.so symlink on Mac...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Mar 19 12:49:35 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: bcf98bd8419997f006811b6f40703e4e791972e6
      https://github.com/llvm/llvm-project/commit/bcf98bd8419997f006811b6f40703e4e791972e6
  Author: Tom Stellard <tstellar at redhat.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/tools/llvm-shlib/CMakeLists.txt

  Log Message:
  -----------
  llvm-shlib: Fix libLLVM-${MAJOR}.so symlink on MacOS (#85163)

This is a partial revert of 10c48a772742b7afe665a815b7eba2047f17dc4b
with a fix for the symlink target name on MacOS

See #84637

(cherry picked from commit ec2b7522dbee1cb91111d6ade6e1768462247dcf)


  Commit: cba6ebf0d0abd226c207a0043dee201ffb805466
      https://github.com/llvm/llvm-project/commit/cba6ebf0d0abd226c207a0043dee201ffb805466
  Author: Tom Stellard <tstellar at redhat.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M llvm/tools/llvm-shlib/CMakeLists.txt

  Log Message:
  -----------
  [llvm-shlib] Fix libLLVM-18 symlink on mingw (#85554)

The TARGET_SONAME_FILE_NAME generator expression is not available on dll
target platforms.

(cherry picked from commit f84980570d3f85bdf5c9432647c05bae04a735a0)


  Commit: c09f6f6f43418b8c67ef8822fbbf5e04296fdf2d
      https://github.com/llvm/llvm-project/commit/c09f6f6f43418b8c67ef8822fbbf5e04296fdf2d
  Author: Martin Storsjö <martin at martin.st>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M llvm/tools/llvm-shlib/CMakeLists.txt

  Log Message:
  -----------
  [llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)

This reverts the changes from 91a384621e5b762d9c173ffd247cfeadd5f436a2
for Windows targets. The changes in that commit don't work as expected
for Windows targets (those parts of llvm_add_library don't quite behave
the same for Windows), while the previous status quo (producing a
library named "libLLVM-<major>.dll") is the defacto standard way of
doing versioned library names there, contrary to on Unix.

After that commit, the library always ended up named "libLLVM.dll",
executables linking against it would reference "libLLVM.dll", and
"libLLVM-<major>.dll" was provided as a symlink.

Thus revert this bit back to as it were, so that executables actually
link against a versioned libLLVM, and no separate symlink is needed.

The only thing that might be improved compared to the status quo as it
was before these changes, is that the import library is named
"lib/libLLVM-<major>.dll.a", while the common style would be to name it
plainly "lib/libLLVM.dll.a" (even while it produces references to
"libLLVM-<major>.dll", but none of these had that effect for Windows
targets.

(As a side note, the llvm-shlib library can be built for MinGW, but not
currently in MSVC configurations.)

(cherry picked from commit cb2ca23345d3d9bde027a18d301949e8bdf606a6)


Compare: https://github.com/llvm/llvm-project/compare/b1f1effacf32...c09f6f6f4341

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list