Author: Mariusz Ceier Date: 2022-02-07T09:21:32-08:00 New Revision: 923b67e36917352c1ca1fb1e339dbe5acdc97ddf
URL: https://github.com/llvm/llvm-project/commit/923b67e36917352c1ca1fb1e339dbe5acdc97ddf DIFF: https://github.com/llvm/llvm-project/commit/923b67e36917352c1ca1fb1e339dbe5acdc97ddf.diff LOG: 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 (cherry picked from commit e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494) Added: Modified: lld/ELF/OutputSections.cpp llvm/include/llvm/Config/config.h.cmake llvm/include/llvm/Config/llvm-config.h.cmake Removed: ################################################################################ diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 241b3ea3b4188..53cdcee1bfe86 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -16,7 +16,7 @@ #include "lld/Common/Memory.h" #include "lld/Common/Strings.h" #include "llvm/BinaryFormat/Dwarf.h" -#include "llvm/Config/config.h" // LLVM_ENABLE_ZLIB +#include "llvm/Config/llvm-config.h" // LLVM_ENABLE_ZLIB #include "llvm/Support/MD5.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Parallel.h" diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake index 064d2f27dc18b..2098c249e20db 100644 --- a/llvm/include/llvm/Config/config.h.cmake +++ b/llvm/include/llvm/Config/config.h.cmake @@ -300,9 +300,6 @@ /* Doesn't use `cmakedefine` because it is allowed to be empty. */ #define LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" -/* Define if zlib compression is available */ -#cmakedefine01 LLVM_ENABLE_ZLIB - /* Define if overriding target triple is enabled */ #cmakedefine LLVM_TARGET_TRIPLE_ENV "${LLVM_TARGET_TRIPLE_ENV}" diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake index ec18b40fe04d9..839a1c7c1984f 100644 --- a/llvm/include/llvm/Config/llvm-config.h.cmake +++ b/llvm/include/llvm/Config/llvm-config.h.cmake @@ -88,6 +88,9 @@ /* Define if we have curl and want to use it */ #cmakedefine LLVM_ENABLE_CURL ${LLVM_ENABLE_CURL} +/* Define if zlib compression is available */ +#cmakedefine01 LLVM_ENABLE_ZLIB + /* Define if LLVM was built with a dependency to the libtensorflow dynamic library */ #cmakedefine LLVM_HAVE_TF_API _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits