[all-commits] [llvm/llvm-project] ebf1fe: [libcxx] [docs] Update the MinGW build example (#6...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Oct 11 06:35:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ebf1feaeda124616778079289bc3773cf33ebb88
      https://github.com/llvm/llvm-project/commit/ebf1feaeda124616778079289bc3773cf33ebb88
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-10-11 (Wed, 11 Oct 2023)

  Changed paths:
    M libcxx/docs/BuildingLibcxx.rst

  Log Message:
  -----------
  [libcxx] [docs] Update the MinGW build example (#68790)

The previous example wasn't a configuration that we actually test, but
was a simplistic configuration with libstdc++ as ABI library.

The previous example configuration has bitrotted and broken in a couple
different ways since it was added:

- In b0fd9497af6d2efd305e9eecfa0c1e265f1b2192, libcxx added uses of weak
  symbols that can be overridden by the user. GNU ld fails to export such
  weak symbols on MinGW, resulting in errors like:
    C:/msys64/mingw64/bin/ld: cannot export _ZNSt3__126__libcpp_assertion_handlerEPKciS1_S1_: symbol wrong type (2 vs 3) 
  By switching to using LLD, -DLLVM_ENABLE_LLD=ON, alternatively
  -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld, linking still succeeds.

- In a80e65e00ada7a9c16acf17a5fd40b4f12ced3a8, building with
  -DLIBCXX_CXX_ABI=libstdc++ in this configuration started failing. Switch
  to showing how to build with libcxxabi instead, which is the tested
  configuration and also is the typical configuration in how it most
  usually would be used on Windows.

These updates allow removing the mentions of the old caveats with the
build configuration.




More information about the All-commits mailing list