зеркало из https://github.com/microsoft/clang-1.git
Fix the !CLANG_ENABLE_ARCMT build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212995 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
738e858bfc
Коммит
8a534e04e6
|
@ -26,11 +26,18 @@ endif ()
|
|||
|
||||
list(APPEND CLANG_TEST_DEPS
|
||||
clang clang-headers
|
||||
c-index-test diagtool arcmt-test c-arcmt-test
|
||||
c-index-test diagtool
|
||||
clang-check clang-format
|
||||
clang-tblgen
|
||||
)
|
||||
|
||||
if (CLANG_ENABLE_ARCMT)
|
||||
list(APPEND CLANG_TEST_DEPS
|
||||
arcmt-test
|
||||
c-arcmt-test
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_CLANG_EXAMPLES)
|
||||
list(APPEND CLANG_TEST_DEPS
|
||||
clang-interpreter
|
||||
|
|
|
@ -5,9 +5,10 @@ if(CLANG_ENABLE_REWRITER)
|
|||
add_subdirectory(clang-format-vs)
|
||||
endif()
|
||||
|
||||
add_subdirectory(c-index-test)
|
||||
add_subdirectory(libclang)
|
||||
|
||||
if(CLANG_ENABLE_ARCMT)
|
||||
add_subdirectory(libclang)
|
||||
add_subdirectory(c-index-test)
|
||||
add_subdirectory(arcmt-test)
|
||||
add_subdirectory(c-arcmt-test)
|
||||
endif()
|
||||
|
|
|
@ -35,6 +35,10 @@ struct Remap {
|
|||
extern "C" {
|
||||
|
||||
CXRemapping clang_getRemappings(const char *migrate_dir_path) {
|
||||
#ifndef CLANG_ENABLE_ARCMT
|
||||
llvm::errs() << "error: feature not enabled in this build\n";
|
||||
return nullptr;
|
||||
#else
|
||||
bool Logging = ::getenv("LIBCLANG_LOGGING");
|
||||
|
||||
if (!migrate_dir_path) {
|
||||
|
@ -71,10 +75,15 @@ CXRemapping clang_getRemappings(const char *migrate_dir_path) {
|
|||
}
|
||||
|
||||
return remap.release();
|
||||
#endif
|
||||
}
|
||||
|
||||
CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
|
||||
unsigned numFiles) {
|
||||
#ifndef CLANG_ENABLE_ARCMT
|
||||
llvm::errs() << "error: feature not enabled in this build\n";
|
||||
return nullptr;
|
||||
#else
|
||||
bool Logging = ::getenv("LIBCLANG_LOGGING");
|
||||
|
||||
std::unique_ptr<Remap> remap(new Remap());
|
||||
|
@ -112,6 +121,7 @@ CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
|
|||
}
|
||||
|
||||
return remap.release();
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned clang_remap_getNumFiles(CXRemapping map) {
|
||||
|
|
|
@ -37,6 +37,20 @@ set(SOURCES
|
|||
../../include/clang-c/Index.h
|
||||
)
|
||||
|
||||
set(LIBS
|
||||
clangAST
|
||||
clangBasic
|
||||
clangFrontend
|
||||
clangIndex
|
||||
clangLex
|
||||
clangSema
|
||||
clangTooling
|
||||
)
|
||||
|
||||
if (CLANG_ENABLE_ARCMT)
|
||||
list(APPEND LIBS clangARCMigrate)
|
||||
endif ()
|
||||
|
||||
option(LIBCLANG_BUILD_STATIC
|
||||
"Build libclang as a static library (in addition to a shared one)" OFF)
|
||||
|
||||
|
@ -69,14 +83,7 @@ add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC}
|
|||
DEPENDS clang-headers
|
||||
|
||||
LINK_LIBS
|
||||
clangARCMigrate
|
||||
clangAST
|
||||
clangBasic
|
||||
clangFrontend
|
||||
clangIndex
|
||||
clangLex
|
||||
clangSema
|
||||
clangTooling
|
||||
${LIBS}
|
||||
|
||||
LINK_COMPONENTS
|
||||
BitReader
|
||||
|
|
Загрузка…
Ссылка в новой задаче