Skip to content

Commit 03f6960

Browse files
committed
[llvm] build Blake3 source with LLVM_EXPORTS defined
1 parent 6f4add3 commit 03f6960

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Support/BLAKE3/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,9 @@ endif()
8585
add_library(LLVMSupportBlake3 OBJECT EXCLUDE_FROM_ALL ${LLVM_BLAKE3_FILES})
8686
set_target_properties(LLVMSupportBlake3 PROPERTIES FOLDER "LLVM/Libraries")
8787
llvm_update_compile_flags(LLVMSupportBlake3)
88+
if(LLVM_BUILD_LLVM_DYLIB OR BUILD_SHARED_LIBS)
89+
# Since LLVMSupportBlake3 is not defined using llvm_add_library(), we must
90+
# define LLVM_EXPORTS here so its public interface is annotated with
91+
# __declspec(dllexport) when building as a DLL on Windows.
92+
target_compile_definitions(LLVMSupportBlake3 PRIVATE LLVM_EXPORTS)
93+
endif()

0 commit comments

Comments
 (0)