[all-commits] [llvm/llvm-project] d75ae2: Set LLVM_ATOMIC_LIB variable for convenient linkin...

Sam James via All-commits all-commits at lists.llvm.org
Thu Nov 10 17:05:09 PST 2022


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: d75ae21044ad893572855cefb0c0898a771b2094
      https://github.com/llvm/llvm-project/commit/d75ae21044ad893572855cefb0c0898a771b2094
  Author: Sam James <sam at gentoo.org>
  Date:   2022-11-10 (Thu, 10 Nov 2022)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/cmake/modules/CheckAtomic.cmake
    M llvm/lib/Support/CMakeLists.txt
    M llvm/tools/dsymutil/CMakeLists.txt

  Log Message:
  -----------
  Set LLVM_ATOMIC_LIB variable for convenient linking against libatomic

* Set LLVM_ATOMIC_LIB to keep track of when we need to link against libatomic.
* Add detection of mold linker which is required for this.
* Use --as-needed when linking against libatomic as a bonus. On some platforms,
  libatomic may be required only sometimes.

Bug: https://bugs.gentoo.org/832675
Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever at Apache.Org>
Tested-by: erhard_f at mailbox.org <erhard_f at mailbox.org>

Differential Revision: https://reviews.llvm.org/D136280

(cherry picked from commit fa981b541365190ae646d2dce575706cd0626cf7)


  Commit: 4c3d83810ad7bde70b2665df9a15947695e92adb
      https://github.com/llvm/llvm-project/commit/4c3d83810ad7bde70b2665df9a15947695e92adb
  Author: Sam James <sam at gentoo.org>
  Date:   2022-11-10 (Thu, 10 Nov 2022)

  Changed paths:
    M lld/COFF/CMakeLists.txt
    M lld/Common/CMakeLists.txt

  Log Message:
  -----------
  Link liblldCOFF against libatomic when necessary

Also simplify code for liblldCommon using the new LLVM_ATOMIC_LIB variable.

Depends on D136280.

Bug: https://bugs.gentoo.org/832675
Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever at Apache.Org>
Tested-by: erhard_f at mailbox.org <erhard_f at mailbox.org>

Differential Revision: https://reviews.llvm.org/D136281

(cherry picked from commit f0b451c77f14947e3e7d314f048679fa2f5c6298)


  Commit: 0988addf2680b3717be47fd6f2493f33fe886f90
      https://github.com/llvm/llvm-project/commit/0988addf2680b3717be47fd6f2493f33fe886f90
  Author: Sam James <sam at gentoo.org>
  Date:   2022-11-10 (Thu, 10 Nov 2022)

  Changed paths:
    M clang/CMakeLists.txt
    M clang/lib/Basic/CMakeLists.txt

  Log Message:
  -----------
  Link libclangBasic against libatomic when necessary.

This is necessary at least on PPC32.

Depends on D136280.

Bug: https://bugs.gentoo.org/874024
Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever at Apache.Org>
Tested-by: erhard_f at mailbox.org <erhard_f at mailbox.org>

Differential Revision: https://reviews.llvm.org/D136282

(cherry picked from commit 20132d8eaa68a6c53e152718beda1dc0f4c9ff6c)


Compare: https://github.com/llvm/llvm-project/compare/6750e341b076...0988addf2680


More information about the All-commits mailing list