forked from OSchip/llvm-project
Update Clang to include the InitializeAllTargets and
InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes for the CMake-based build with Xcode. llvm-svn: 73544
This commit is contained in:
parent
1b731d5dbe
commit
274a6b4f2d
|
@ -15,7 +15,12 @@ set(files
|
|||
xmmintrin.h)
|
||||
|
||||
#FIXME: Centralize Clang version info
|
||||
set(output_dir ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib/clang/1.0/include)
|
||||
if (MSVC_IDE OR XCODE)
|
||||
set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/1.0/include)
|
||||
else ()
|
||||
set(output_dir ${LLVM_BINARY_DIR}/lib/clang/1.0/include)
|
||||
endif ()
|
||||
|
||||
|
||||
foreach( f ${files} )
|
||||
set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
find_file(CLANG_TEST_RUNNER TestRunner.sh PATHS ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DOC "Clang's regression testing script")
|
||||
mark_as_advanced(CLANG_TEST_RUNNER)
|
||||
|
||||
set(CLANG_TEST_DIRECTORIES
|
||||
"Analysis"
|
||||
"CodeGen"
|
||||
"CodeGenCXX"
|
||||
"CodeGenObjC"
|
||||
"Coverage"
|
||||
"CXX"
|
||||
"Driver"
|
||||
"FixIt"
|
||||
"Frontend"
|
||||
|
@ -28,14 +25,18 @@ if(PYTHONINTERP_FOUND)
|
|||
get_target_property(LLVM_TOOLS_PATH clang RUNTIME_OUTPUT_DIRECTORY)
|
||||
set(TESTING_EXTRA_PATHS
|
||||
"${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}:${LLVM_SOURCE_DIR}/test/Scripts")
|
||||
set(CLANG_TEST_EXTRA_ARGS)
|
||||
if (MSVC OR XCODE)
|
||||
set(CLANG_TEST_EXTRA_ARGS "--no-progress-bar")
|
||||
endif()
|
||||
set(all_testdirs)
|
||||
foreach(testdir ${CLANG_TEST_DIRECTORIES})
|
||||
foreach(testdir ${CLANG_TEST_DIRECTORIES})
|
||||
add_custom_target(clang-test-${testdir}
|
||||
${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/tools/clang/utils/test/MultiTestRunner.py
|
||||
-s
|
||||
"--path=${TESTING_EXTRA_PATHS}"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${testdir}/
|
||||
"--path=${TESTING_EXTRA_PATHS}"
|
||||
-s ${CLANG_TEST_EXTRA_ARGS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${testdir}/
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Running Clang regression tests in ${testdir}")
|
||||
|
||||
|
@ -46,6 +47,7 @@ if(PYTHONINTERP_FOUND)
|
|||
${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/tools/clang/utils/test/MultiTestRunner.py
|
||||
"--path=${TESTING_EXTRA_PATHS}"
|
||||
-s ${CLANG_TEST_EXTRA_ARGS}
|
||||
${all_testdirs}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS clang clang-cc
|
||||
|
|
|
@ -67,6 +67,8 @@
|
|||
#include "llvm/System/Process.h"
|
||||
#include "llvm/System/Program.h"
|
||||
#include "llvm/System/Signals.h"
|
||||
#include "llvm/InitializeAllTargets.h"
|
||||
#include "llvm/InitializeAllAsmPrinters.h"
|
||||
#include <cstdlib>
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
|
|
|
@ -275,7 +275,6 @@ def main():
|
|||
tests = tests[:opts.maxTests]
|
||||
if opts.path is not None:
|
||||
os.environ["PATH"] = opts.path + ":" + os.environ["PATH"];
|
||||
print "Current PATH is: ", os.environ["PATH"]
|
||||
|
||||
extra = ''
|
||||
if len(tests) != len(allTests):
|
||||
|
|
Loading…
Reference in New Issue