Skip to content

Commit

Permalink
Remove Workarounf for LTO bugs when compiling C++ for windows
Browse files Browse the repository at this point in the history
Issue was resolved in zig 0.12
  • Loading branch information
HeavenVolkoff authored Apr 22, 2024
1 parent 0720cf9 commit 9b3af32
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions scripts/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,3 @@ EOF
ln -s "gcc_eh.pc.pc" "${PREFIX}/lib/pkgconfig/libgcc_eh.pc"
;;
esac

case "$TARGET" in
*windows-gnu)
# Work around LTO bugs when compiling C++ for windows targets
# https://github.com/ziglang/zig/issues/15958#issuecomment-1764915440
sed -i '/_free_locale))(_locale_t)/s/^/__attribute__((used)) /' "${SYSROOT}/lib/libc/mingw/misc/_free_locale.c"
sed -i '/_create_locale))(int, const char \*)/s/^/__attribute__((used)) /' "${SYSROOT}/lib/libc/mingw/misc/_create_locale.c"
;;
esac

0 comments on commit 9b3af32

Please sign in to comment.