[cmake] Add linker option "-Wl,-z,defs" in standalone build
authorMichal Gorny <mgorny@gentoo.org>
Tue, 27 Sep 2016 12:15:35 +0000 (12:15 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Tue, 27 Sep 2016 12:15:35 +0000 (12:15 +0000)
commit4601ac04c7386f099b546a40384022016fc4c22b
treea89346b5cdfd899336bb95a208f8d0b56122896a
parent3d3ae6f4963786d0f4cd48a39e0d4d22f36a65c5
[cmake] Add linker option "-Wl,-z,defs" in standalone build

Add the "-Wl,-z,defs" linker option that is used to prevent
underlinking. It is already used by LLVM itself but does not get
propagated into stand-alone build of libc++. This patch ensures
that the option is passed in independently of whether libc++ is built
in-tree or out-of-tree.

Patch by Lei Zhang.

Differential Revision: https://reviews.llvm.org/D24119

llvm-svn: 282483
libcxx/CMakeLists.txt