Skip to content

Conversation

jeromehaxhiaj-qti
Copy link
Contributor

@jeromehaxhiaj-qti jeromehaxhiaj-qti commented Sep 11, 2025

Windows DLLs can't contain unresolved symbols. Therefore systemc,
when built with MSYS2, is split in two libraries: libsystemc-.dll
without unresolved symbols and libsystemc.a with unresolved symbols.

Currently, cmake target systemc (exposing libsystemc.a) is aliased as SystemC::systemc

This leads to a situation where projects that depend SystemC::systemc
would link only against the systemc.a and drop the dll.

This commit introduces the interface target library systemc_if,
which links against systemc dll and static and is aliased as SystemC::systemc.

To insure backward compatiblity, this mechanism is enabled only
when systemc is built as a shared library

This commits reworks the sections that merges
libsystemc.a and libsystemc-.dll.a

This patch removes conditional type for os.setf(), which was failing on
msys2 llvm environment and replaces it by auto type.

Signed-off-by: Jerome Haxhiaj <jhaxhiaj@qti.qualcomm.com>
@jeromehaxhiaj-qti
Copy link
Contributor Author

This pull-requests depends on #127

Windows DLLs can't contain unresolved symbols. Therefore systemc,
when built with MSYS2, is split in two libraries: libsystemc-<version>.dll
without unresolved symbols and libsystemc.a with unresolved symbols.

Currently, cmake target systemc (exposing libsystemc.a) is aliased as SystemC::systemc

This leads to a situation where projects that depend SystemC::systemc
would link only against the systemc.a and drop the dll.

This commit introduces the interface target library `systemc_if`,
which links against systemc dll and static and is aliased as SystemC::systemc.

To insure backward compatiblity, this mechanism is enabled only
when systemc is built as a shared library

This commits reworks the sections that merges
libsystemc.a and libsystemc-<version>.dll.a
@jeromehaxhiaj-qti jeromehaxhiaj-qti changed the title msys: Fix DLL dependency linkage Windows: Refactor DLL creation on Cygwin/MinGW env Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant