nixpkgs/pkgs/development/compilers/swift/compiler/patches/swift-darwin-link-cxxabi.patch
2023-04-30 15:03:20 +02:00

15 lines
529 B
Diff

This patches the stdlib backdeploy static lib to have its users link c++abi.
Without this, later steps that try to link this fail looking for global
new/delete operators (__Znwm/__ZdlPv).
--- a/stdlib/toolchain/Compatibility56/Overrides.cpp
+++ b/stdlib/toolchain/Compatibility56/Overrides.cpp
@@ -23,6 +23,7 @@
using namespace swift;
__asm__ (".linker_option \"-lc++\"");
+__asm__ (".linker_option \"-lc++abi\"");
#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs) \
Override_ ## name name;