Skip to content

[ Windows] [C++20] [Modules] [ABI] Linker errors relating to vftable with C++20 modules #97447

Closed
@kamrann

Description

@kamrann

The following simple repro will generate multiple definition linker errors on Windows (regardless of link.exe or lld-link.exe, so appears the issue is with clang emitting symbols for every TU importing the module in question).

// mod.mxx
export module mod;
export struct poly
{
  virtual ~poly() = default;
};
// a.cxx
import mod;
poly p1;
// b.cxx
import mod;
poly p2;

int main() { return 0; }

Tested with multiple build systems (CMake and build2), on

Edit: appears to be a regression, problem does not show up on 18.1.8 (3b5b5c1).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions