[PATCH] D31272: Do not pass an explicit reexported symbol list when building libc++ dylib if also defining new/delete
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 27 22:18:26 PDT 2017
EricWF added a comment.
In https://reviews.llvm.org/D31272#711876, @mehdi_amini wrote:
> Strange. So installing the command line tools is not enough. It has to be that CMAKE_OSX_SYSROOT is only defined on Apple internal install maybe?
Are you sure you're starting with a clean CMake build directory?
> Anyway, if you're exporting through the ABI list and have LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS I expect the link to fail. You're not observing this?
I am not observing this, and LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS is ON. I also added `-DCMAKE_OSX_SYSROOT=""` but that had no effect as I would expect.
> I have this error:
>
> ld: requested re-export symbol operator new(unsigned long) is not from a dylib, but from lib/CMakeFiles/cxx_objects.dir/__/src/new.cpp.o
> file 'lib/CMakeFiles/cxx_objects.dir/__/src/new.cpp.o' for architecture x86_64
Interesting. That seems to suggest that `libc++abi.dylib` doesn't provide the definition at all. Not necessarily that
the duplicate definitions are causing this.
> I can reproduce with: `cmake -GNinja -DCMAKE_OSX_SYSROOT="" path/to/libcxx`
Here is the script I use to build libc++ on https://gist.github.com/EricWF/0bc0ba09b8844d0201b18a01f8f7ffb9.
https://reviews.llvm.org/D31272
More information about the cfe-commits
mailing list