| commit | a88e655809655eec8fa85366318fb3c4a0baa113 | [log] [tgz] |
|---|---|---|
| author | Andrew Rogers <andrurogerz@gmail.com> | Wed Jun 18 13:08:05 2025 -0700 |
| committer | GitHub <noreply@github.com> | Wed Jun 18 13:08:05 2025 -0700 |
| tree | f0862e20e8ff2459edcd6b6822f4a36884bd4461 | |
| parent | a630ca6f6c4727d852d60076d1179c3e9830ca2f [diff] |
[llvm] build Blake3 source with LLVM_EXPORTS defined (#144753) ## Purpose This patch ensures that the BLAKE3 implementation in the LLVM Support library exports its public interface with `__declspec(dllexport)` when building LLVM as a Windows DLL. ## Background The effort to support building LLVM as a Windows DLL is tracked in #109483. Additional context is provided in [this discourse](https://discourse.llvm.org/t/psa-annotating-llvm-public-interface/85307). ## Overview Replicate [this logic](https://github.com/llvm/llvm-project/blob/main/llvm/cmake/modules/AddLLVM.cmake#L662-L664) from `llvm_add_library()` for the `LLVMSupportBlake3` target. Without this change, the `llvm_blake_` functions will only be annotated with `__declspec(dllimport)` when building LLVM as a Windows DLL which leads to inconsistent DLL linkage warnings from MSVC and `clang-cl`.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.