]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
Use -Wl,defs when linking.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 20 Jan 2015 21:23:15 +0000 (21:23 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 20 Jan 2015 21:23:15 +0000 (21:23 +0000)
commite4f11175cb95cd8609c0a81c798a550bd9add685
tree1fd7f092daf79f472b0fbb25c9f83960dbcaa557
parent28f591c3d78d0ad93eec7b599d287ef1cda2a163
Use -Wl,defs when linking.

ELF linkers by default allow shared libraries to contain undefined references
and it is up to the dynamic linker to look for them.

On COFF and MachO, that is not the case.

This creates a situation where a .so might build on an ELF system, but the build
of the corresponding .dylib or .dll will fail.

This patch changes the cmake build to use -Wl,-z,defs when linking and updates
the dependencies so that -DBUILD_SHARED_LIBS=ON build still works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226611 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/HandleLLVMOptions.cmake
utils/unittest/CMakeLists.txt