diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-11-17 19:29:16 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-11-17 19:29:16 +0900 |
| commit | a6fe3feacdfce00f42aadd4880cba3b67ff9a5d4 (patch) | |
| tree | e345bff367bf2c9aa25fbcaa85b9069422a6dc4b | |
| parent | 6588cc4e29074d7b0d3d78725769d2efba1c25ee (diff) | |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12107
| -rw-r--r-- | win32/Makefile.sub | 3 | ||||
| -rwxr-xr-x | win32/mkexports.rb | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index b508b50124..ce4ea06c92 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -163,6 +163,9 @@ OPTFLAGS = -O2b2xg- OPTFLAGS = -O2sy- !endif !endif +!if $(MSC_VER) >= 1900 +OPTFLAGS = $(OPTFLAGS) -Zc:inline +!endif !if !defined(incflags) incflags = !endif diff --git a/win32/mkexports.rb b/win32/mkexports.rb index 1250673c6f..1a37c7ee91 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -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 |
