defold / defold

Defold is a completely free to use game engine for development of desktop, mobile and web games.
https://www.defold.com
Other
4.03k stars 287 forks source link

Support for --start-group / --end-group when linking native extensions #8881

Open dri-richard opened 1 year ago

dri-richard commented 1 year ago

Is your feature request related to a problem? Please describe : When building a native extension, the order that the required libraries are supplied to the linker can't be controlled, and in particular dependencies can be listed before the library built from the NE source. See forum post here

Describe the solution you'd like : Extender wraps the libraries in --start-group / --end-group

Describe alternatives you've considered : None I can think of.

Additional context : This branch of extension-firebase can be used to reproduce the problem when building a x86_64-win32 target.

dri-richard commented 5 months ago

This is less pressing for me now, but might still be useful for others. The original context was: Firebase's C++ SDK is supported on Windows, Mac and Linux and I wanted to modify https://github.com/defold/extension-firebase to build for Windows which was my primary dev platform at the time.

Two things have changed:-

  1. extension-firebase doesn't use the C++ SDK now, so building it for Windows would be much more complex than adding a few manifest flags.
  2. I now mostly use Mac, and adding Mac support to extension-firebase can use a similar method to iOS
ekharkunov commented 3 months ago

Neither Windows nor MacOS linkers don't support --start-group/--end-group flags. I can't find any direct alternative so need to discuss further how it can be implemented.