Fix lld standalone build
authorMariusz Ceier <mceier+llvm@gmail.com>
Mon, 7 Feb 2022 17:20:03 +0000 (09:20 -0800)
committerFangrui Song <i@maskray.me>
Mon, 7 Feb 2022 17:20:03 +0000 (09:20 -0800)
commite8bff9ae54a55b4dbfeb6ba55f723abbd81bf494
tree82a57db44dc0aacdf1924f1631a5e9a5682f67a9
parent897d92faeff65e5fcccaeaf28cd992bec8f05a50
Fix lld standalone build

lld/ELF/OutputSections.cpp includes llvm/Config/config.h for
LLVM_ENABLE_ZLIB definition, but llvm/Config/config.h doesn't exist in
standalone build.

To fix this, this patch moves LLVM_ENABLE_ZLIB from config.h to
llvm-config.h and updates OutputSections.cpp to include llvm-config.h
instead of config.h

Reviewed By: MaskRay, mgorny

Differential Revision: https://reviews.llvm.org/D119058
lld/ELF/OutputSections.cpp
llvm/include/llvm/Config/config.h.cmake
llvm/include/llvm/Config/llvm-config.h.cmake