godotengine / webrtc-native

The official GDNative WebRTC implementation for non-html exports.
MIT License
198 stars 27 forks source link

[Linux] Only export extension init symbol #131

Closed Faless closed 6 months ago

Faless commented 6 months ago

Since we link with static libstdc++ we need to tell gcc to only export the necessary symbols. Using "-fvisibility=hidden" will not work, since libstdc++ explicitly export its symbols.

Fixes #127 .

Sch1nken commented 6 months ago

I don't know how flexible Sconstruct is, but could the build system potentially read the .gdextension file to determine the entry_symbol and generate the symbols.map file during compilation?

This is not really related to this WebRTC Extension anymore, but I wonder if this is a good "default" behaviour for new extension (i.e. the demo repository from Godot for GDExtensions). Or alternatively provide a flag that enables/disables the version script usage.

Faless commented 6 months ago

I don't know how flexible Sconstruct is, but could the build system potentially read the .gdextension file to determine the entry_symbol and generate the symbols.map file during compilation?

It's possible, I've been thinking about creating a GDExtension tool for SCons for a while, which should ideally also generate the .gdextension file.