Skip to content

Commit a6fe3fe

Browse files
committed
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.
1 parent 6588cc4 commit a6fe3fe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

win32/Makefile.sub

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ OPTFLAGS = -O2b2xg-
163163
OPTFLAGS = -O2sy-
164164
!endif
165165
!endif
166+
!if $(MSC_VER) >= 1900
167+
OPTFLAGS = $(OPTFLAGS) -Zc:inline
168+
!endif
166169
!if !defined(incflags)
167170
incflags =
168171
!endif

win32/mkexports.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def each_export(objs)
122122
elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1')
123123
next
124124
end
125-
next if /\A_?ucrt_/ =~ l
126125
when /DLL/
127126
next unless l.sub!(/^\s*\d+\s+[[:xdigit:]]+\s+[[:xdigit:]]+\s+/, '')
128127
else

0 commit comments

Comments
 (0)