Files
CMake/.gitattributes
Florent Castelli a498d459a3 bindexplib: Export the same symbols on every host
WINDOWS_EXPORT_ALL_SYMBOLS reads object files with two backends: on
Windows hosts CMake walks the COFF symbol table itself, elsewhere (and
for LLVM bitcode) it parses `nm` output.  Only the walker applied the
rules the MSVC ABI needs, so a DLL cross-compiled from Linux or macOS
exported a different set of symbols than the same sources built on
Windows.

Move every rule that depends only on the symbol name into one place
used by both backends, and teach the nm backend the rest: skip
deleting destructors (`??_G`, `??_E`), export vftables (`??_7`) as code
except on ARM64EC where they are DATA, ignore common symbols, and strip
i386 decorations.  The machine type these need is read from the COFF
file header, once per object file.

The expected output of the nm symbol-type test changes accordingly.
Add a test running `cmake -E __create_def` over checked-in objects for
x86_64, i386 and ARM64EC against expected .def files, so one
expectation pins both backends.

Fixes: #28103
2026-09-30 02:45:08 +02:00

76 lines
2.1 KiB
Plaintext

.git* export-ignore
.hooks* export-ignore
.clang-format export-ignore
.clang-tidy export-ignore
.codespellrc export-ignore
.devcontainer export-ignore
.editorconfig export-ignore
.pre-commit-config.yaml export-ignore
.pvsconfig export-ignore
.typos.toml export-ignore
sgconfig.yml export-ignore
# Custom attribute to mark sources as using our C code style.
[attr]our-c-style whitespace=tab-in-indent format.clang-format=18
# Custom attribute to mark sources as generated.
# Do not perform whitespace checks. Do not format.
[attr]generated whitespace=-tab-in-indent,-indent-with-non-tab -format.clang-format
# Custom attribute to mark files as TABs indented.
[attr]tab-indent whitespace=-tab-in-indent
bootstrap eol=lf
configure eol=lf
*.[1-9] eol=lf
*.bash eol=lf
*.sh eol=lf
*.sh.in eol=lf
*.bat eol=crlf
*.bat.in eol=crlf
*.cmd eol=crlf
*.sln eol=crlf
*.vcproj eol=crlf
Makefile tab-indent
Makefile.in tab-indent
NSIS.template.in tab-indent
coverage.xml.in tab-indent
*.F tab-indent
*.f tab-indent
*.pbxproj.in tab-indent
*.plist.in tab-indent
*.plist tab-indent
*.sln tab-indent
*.s tab-indent
*.vcproj tab-indent
*.vcproj.in tab-indent
*.vfproj.in tab-indent
*.xib tab-indent
*.make tab-indent
.hooks-config tab-indent
*.obj -text
*.pfx -text
*.png -text
*.png.in -text
*.c our-c-style
*.cc our-c-style
*.cpp our-c-style
*.cu our-c-style
*.cxx our-c-style
*.H our-c-style
*.h our-c-style
*.hh our-c-style
*.hip our-c-style
*.hpp our-c-style
*.hxx our-c-style
*.notcu our-c-style
*.tcc our-c-style
*.cmake whitespace=tab-in-indent
*.rst whitespace=tab-in-indent conflict-marker-size=79
*.txt whitespace=tab-in-indent