зеркало из https://github.com/microsoft/clang-1.git
Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.
Only 1 minor code change was necessary: can't use cdecl as variable name anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
f8cc02e505
Коммит
a08e7bc74b
|
@ -198,14 +198,6 @@ macro(add_clang_library name)
|
|||
link_system_libs( ${name} )
|
||||
|
||||
add_dependencies(${name} ClangDiagnosticCommon)
|
||||
if(MSVC)
|
||||
get_target_property(cflag ${name} COMPILE_FLAGS)
|
||||
if(NOT cflag)
|
||||
set(cflag "")
|
||||
endif(NOT cflag)
|
||||
set(cflag "${cflag} /Za")
|
||||
set_target_properties(${name} PROPERTIES COMPILE_FLAGS ${cflag})
|
||||
endif(MSVC)
|
||||
install(TARGETS ${name}
|
||||
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
|
|
|
@ -3200,8 +3200,8 @@ CFGImplicitDtor::getDestructorDecl(ASTContext &astContext) const {
|
|||
}
|
||||
|
||||
bool CFGImplicitDtor::isNoReturn(ASTContext &astContext) const {
|
||||
if (const CXXDestructorDecl *cdecl = getDestructorDecl(astContext)) {
|
||||
QualType ty = cdecl->getType();
|
||||
if (const CXXDestructorDecl *decl = getDestructorDecl(astContext)) {
|
||||
QualType ty = decl->getType();
|
||||
return cast<FunctionType>(ty)->getNoReturnAttr();
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -20,13 +20,6 @@ add_clang_library(clangDriver
|
|||
Types.cpp
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
get_target_property(NON_ANSI_COMPILE_FLAGS clangDriver COMPILE_FLAGS)
|
||||
string(REPLACE /Za
|
||||
"" NON_ANSI_COMPILE_FLAGS
|
||||
${NON_ANSI_COMPILE_FLAGS})
|
||||
set_target_properties(clangDriver PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
||||
ENDIF(MSVC)
|
||||
|
||||
add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver
|
||||
ClangDriverOptions ClangCC1AsOptions)
|
||||
|
|
|
@ -41,13 +41,6 @@ add_clang_library(clangFrontend
|
|||
Warnings.cpp
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
get_target_property(NON_ANSI_COMPILE_FLAGS clangFrontend COMPILE_FLAGS)
|
||||
string(REPLACE /Za
|
||||
"" NON_ANSI_COMPILE_FLAGS
|
||||
${NON_ANSI_COMPILE_FLAGS})
|
||||
set_target_properties(clangFrontend PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
||||
ENDIF(MSVC)
|
||||
|
||||
add_dependencies(clangFrontend
|
||||
ClangAttrClasses
|
||||
|
|
|
@ -76,13 +76,6 @@ if( LLVM_ENABLE_PIC )
|
|||
INSTALL_NAME_DIR "@executable_path/../lib")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# windows.h doesn't compile with /Za
|
||||
get_target_property(NON_ANSI_COMPILE_FLAGS libclang COMPILE_FLAGS)
|
||||
string(REPLACE "/Za" "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
||||
set_target_properties(libclang PROPERTIES
|
||||
COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
||||
endif()
|
||||
|
||||
set(LIBCLANG_STATIC_TARGET_NAME libclang_static)
|
||||
else()
|
||||
|
|
Загрузка…
Ссылка в новой задаче