llvm / llvm/llvm-project

`registerImplicitTypeID` conflicts with dynlib on `x86_64-pc-windows-gnullvm`

Open
#168,790 2 comments 0 reactions 0 assignees View on GitHub
mlir
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

https://github.com/llvm/llvm-project/blob/9b7fd0099e79b0f5b824027cbae8a25356486ac9/mlir/include/mlir/Support/TypeID.h#L167

Consider `libX` being a DLL built with MLIR.
Binary `A` links against both MLIR's libraries and `libX`.

With `x86_64-pc-windows-gnullvm` this leads to duplicated symbols even when `libX` is compiled with visibility hidden as `registerImplicitTypeID` is forcibly marked as exported.

Contributor guide

Open the contributing guide

Research direction

Start with mlir/include/mlir/Support/TypeID.h at the linked registerImplicitTypeID definition and inspect how its symbol visibility is handled for x86_64-pc-windows-gnullvm. Reproduce the libX and binary A linking scenario, then verify that the resulting build no longer has duplicated symbols while TypeID registration still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.