Skip to content

Commit

Permalink
Merge pull request #134 from Faless/fix/mingw_only_export_init_symbol
Browse files Browse the repository at this point in the history
[Windows/MinGW] Only export extension init symbol
  • Loading branch information
Faless authored Dec 22, 2023
2 parents fa28efa + 1831677 commit 86d080b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,13 @@ env.Depends(sources, ssl + rtc)
# symbols using a GCC version script, or we might end up overriding symbols from other libraries.
# Using "-fvisibility=hidden" will not work, since libstdc++ explicitly exports its symbols.
symbols_file = None
if env["platform"] == "linux":
if env["platform"] == "linux" or (
env["platform"] == "windows" and env.get("use_mingw", False) and not env.get("use_llvm", False)
):
if env["godot_version"] == "3":
symbols_file = env.File("misc/dist/linux/symbols-gdnative.map")
symbols_file = env.File("misc/gcc/symbols-gdnative.map")
else:
symbols_file = env.File("misc/dist/linux/symbols-extension.map")
symbols_file = env.File("misc/gcc/symbols-extension.map")
env.Append(
LINKFLAGS=[
"-Wl,--no-undefined,--version-script=" + symbols_file.abspath,
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 86d080b

Please sign in to comment.