Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build Dart as a shared library on Windows #54537

Open
ds84182 opened this issue Jan 7, 2024 · 0 comments
Open

Cannot build Dart as a shared library on Windows #54537

ds84182 opened this issue Jan 7, 2024 · 0 comments
Labels
area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). os-windows type-enhancement A request for a change that isn't a bug

Comments

@ds84182
Copy link
Contributor

ds84182 commented Jan 7, 2024

Locally I patch:

runtime/BUILD.gn:

  • include library dependencies (for example ole32.lib) in the dart_shared_lib config
  • include bin:dart_io_api (since Dart without dart:io is unfortunately "awful" to deal with, also requires exporting symbols in dart_io_api.h)

While this patch is mostly sustainable, Dart's tests that directly link to dart.lib on Windows need to also link an appropriate DLL library. e.g. libdart_jit.dll.lib.


The reason why I build Dart as a shared library is to reduce iteration time & enable usage outside of GN. It works well, other than these build-related issues. Of course this use-case is somewhat atypical, but isn't much of a burden to support (I think shared objects build fine on Linux).

@lrhn lrhn added area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). os-windows type-enhancement A request for a change that isn't a bug labels Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). os-windows type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants