[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 24 17:03:28 PDT 2025
jeremyd2019 wrote:
I was thinking that `-u` wouldn't do anything useful (and I'm still thinking that), but I just had a thought about why you might think it's necessary (or, why it might not work as expected).
`--wrap` renames the definition to `__real_X` and references to `__wrap_X`. If libc++ has the operator new/delete declared as dllimport, the symbol involved would actually be `__imp_X`, which wouldn't be redirected by `--wrap`. `-u` might be trying to force the inclusion of the jump stub, which would be wrapped. But, `__imp_X` is still unwrapped and might be used directly. Does this make sense?
https://github.com/llvm/llvm-project/pull/147960
More information about the cfe-commits
mailing list