[all-commits] [llvm/llvm-project] 00cd1a: Update llvm::Registry to work for LLVM shared libr...

Thomas Fransham via All-commits all-commits at lists.llvm.org
Tue Oct 15 22:41:54 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00cd1a06daa7f950cf0954c7f9fafc371c255639
      https://github.com/llvm/llvm-project/commit/00cd1a06daa7f950cf0954c7f9fafc371c255639
  Author: Thomas Fransham <tfransham at gmail.com>
  Date:   2024-10-16 (Wed, 16 Oct 2024)

  Changed paths:
    M clang/include/clang/Basic/ParsedAttrInfo.h
    M clang/include/clang/Frontend/FrontendPluginRegistry.h
    M clang/include/clang/Lex/Preprocessor.h
    M clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h
    M clang/include/clang/Tooling/ToolExecutorPluginRegistry.h
    M llvm/include/llvm/CodeGen/GCMetadataPrinter.h
    M llvm/include/llvm/IR/GCStrategy.h
    M llvm/include/llvm/Support/Compiler.h
    M llvm/include/llvm/Support/Registry.h

  Log Message:
  -----------
  Update llvm::Registry to work for LLVM shared library builds on windows (#109024)

This is part of the effort to support for enabling plugins on windows by
adding better support for building llvm and clang as a DLL.

Since windows doesn't implicitly import and merge exported symbols
across shared libraries like other platforms we need to explicitly add a
extern template declaration for each instantiation of llvm::Registry to
force the registry symbols to be dllimport'ed.
I've added a new visibility macro that doesn't switch between dllimport
and dllexport on windows since the existing macro would be in the wrong
mode for llvm::Registry's declared in Clang. This PR also depends Clang
symbol visibility macros that will be added by #108276

---------

Co-authored-by: Saleem Abdulrasool <compnerd at compnerd.org>



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