Win32: Remove unreferenced COMDAT from object files

Windows 11 SDK Version 10.0.26100.0 introduced a new internal inline
function in ucrt/corecrt_math.h.  Even it appears in object files and
will be included in the DEF file, it will be removed from the DLL and
result in a linker error.
This commit is contained in:
Nobuyoshi Nakada 2024-11-17 19:29:16 +09:00
parent 6588cc4e29
commit a6fe3feacd
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-11-17 12:46:00 +00:00
2 changed files with 3 additions and 1 deletions

View File

@ -163,6 +163,9 @@ OPTFLAGS = -O2b2xg-
OPTFLAGS = -O2sy-
!endif
!endif
!if $(MSC_VER) >= 1900
OPTFLAGS = $(OPTFLAGS) -Zc:inline
!endif
!if !defined(incflags)
incflags =
!endif

View File

@ -122,7 +122,6 @@ class Exports::Mswin < Exports
elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1')
next
end
next if /\A_?ucrt_/ =~ l
when /DLL/
next unless l.sub!(/^\s*\d+\s+[[:xdigit:]]+\s+[[:xdigit:]]+\s+/, '')
else