[all-commits] [llvm/llvm-project] abbdd1: [llvm] minor fixes for clang-cl Windows DLL build ...
Andrew Rogers via All-commits
all-commits at lists.llvm.org
Tue Jun 17 17:22:02 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: abbdd1670d8b12dd72ec353b14e256619ff4694b
https://github.com/llvm/llvm-project/commit/abbdd1670d8b12dd72ec353b14e256619ff4694b
Author: Andrew Rogers <andrurogerz at gmail.com>
Date: 2025-06-17 (Tue, 17 Jun 2025)
Changed paths:
M clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp
M llvm/include/llvm/BinaryFormat/Dwarf.h
M llvm/include/llvm/Object/ELF.h
M llvm/lib/BinaryFormat/Dwarf.cpp
Log Message:
-----------
[llvm] minor fixes for clang-cl Windows DLL build (#144386)
## Purpose
This patch makes a minor changes to LLVM and Clang so that LLVM can be
built as a Windows DLL with `clang-cl`. These changes were not required
for building a Windows DLL with MSVC.
## Background
The Windows DLL effort is tracked in #109483. Additional context is
provided in [this
discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307),
and documentation for `LLVM_ABI` and related annotations is found in the
LLVM repo
[here](https://github.com/llvm/llvm-project/blob/main/llvm/docs/InterfaceExportAnnotations.rst).
## Overview
Specific changes made in this patch:
- Remove `constexpr` fields that reference DLL exported symbols. These
symbols cannot be resolved at compile time when building a Windows DLL
using `clang-cl`, so they cannot be `constexpr`. Instead, they are made
`const` and initialized in the implementation file rather than at
declaration in the header.
- Annotate symbols now defined out-of-line with `LLVM_ABI` so they are
exported when building as a shared library.
- Explicitly add default copy assignment operator for `ELFFile` to
resolve a compiler warning.
## Validation
Local builds and tests to validate cross-platform compatibility. This
included llvm, clang, and lldb on the following configurations:
- Windows with MSVC
- Windows with Clang
- Linux with GCC
- Linux with Clang
- Darwin with Clang
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