forked from OSchip/llvm-project
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
This commit is contained in:
parent
897d92faef
commit
e8bff9ae54
|
@ -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"
|
||||
|
|
|
@ -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}"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue