[Order Files] Don't use empty order files
authorChris Bieneman <beanz@apple.com>
Thu, 11 Aug 2016 00:19:51 +0000 (00:19 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 11 Aug 2016 00:19:51 +0000 (00:19 +0000)
commit8a22e502bdd7e4181b1b2d66b1a1da9c29a287c8
tree49d707a17fcb92c8caf3add1af10dad902a6ad70
parentcec435fe75ef0cfd8056d7e8f6dcc76c39064931
[Order Files] Don't use empty order files

LD64 does optimization on symbol layouts that gets disabled whenever an order file is passed (even if it is empty). This change prevents disabling that optimization, and still enables iterative generation and usage of order files.

If the order file is empty it does not setup the order file flags, instead it sets the empty order file as a configuration dependency. When the order file changes it will then trigger a re-configuration that adds the linker flag.

llvm-svn: 278306
clang/tools/driver/CMakeLists.txt