apple / swift-foundation

The Foundation project
Apache License 2.0
2.29k stars 135 forks source link

Eliminate removefile shims fixing release mode build #655

Closed jmschonfeld closed 1 month ago

jmschonfeld commented 1 month ago

Previous, building the package in release mode may encounter a linker failure due to the _RemoveFile_ConfirmCallback and _RemoveFile_ErrorCallback symbols. These were symbols referenced from the _CShims that were not exported from FoundationEssentials, and building without library evolution enabled resulted in a linker failure.

As a solution to this, I removed the symbols entirely using a nicer closure syntax (and removed the other function in this shim as well allowing me to delete the shim entirely and replace it with pure swift code that calls the c functions directly).

jmschonfeld commented 1 month ago

@swift-ci please test

jmschonfeld commented 1 month ago

@swift-ci please test