Disable Windows build

Summary:
Build is already broken because VS fails to locate
llvm-boltdiff when running tests, and VS also complains that
include/bolt/Passes/InstrumentationSummary.h is lacking an include
string header. Disable this until we have a Windows buildbot to make
sure this build is sane.

(cherry picked from FBD33039972)
This commit is contained in:
Rafael Auler 2021-12-10 21:19:18 -08:00 committed by Maksim Panchenko
parent ebe51c4d23
commit bb201ca3e8
1 changed files with 68 additions and 64 deletions

View File

@ -4,77 +4,81 @@ set(BOLT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(BOLT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(BOLT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(BOLT_ENABLE_RUNTIME OFF) if (NOT CMAKE_HOST_SYSTEM_NAME MATCHES Linux)
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64") message(WARNING "Not building BOLT on unsupported platform")
set(BOLT_ENABLE_RUNTIME ON) else()
endif() set(BOLT_ENABLE_RUNTIME OFF)
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
set(BOLT_ENABLE_RUNTIME ON)
endif()
set(BOLT_INCLUDE_TESTS OFF) set(BOLT_INCLUDE_TESTS OFF)
if (LLVM_INCLUDE_TESTS) if (LLVM_INCLUDE_TESTS)
string(FIND "${LLVM_ENABLE_PROJECTS}" "clang" POSITION) string(FIND "${LLVM_ENABLE_PROJECTS}" "clang" POSITION)
if (NOT ${POSITION} EQUAL -1)
string(FIND "${LLVM_ENABLE_PROJECTS}" "lld" POSITION)
if (NOT ${POSITION} EQUAL -1) if (NOT ${POSITION} EQUAL -1)
set(BOLT_INCLUDE_TESTS ON) string(FIND "${LLVM_ENABLE_PROJECTS}" "lld" POSITION)
if (NOT ${POSITION} EQUAL -1)
set(BOLT_INCLUDE_TESTS ON)
else()
message(WARNING "Not including BOLT tests since lld is disabled")
endif()
else() else()
message(WARNING "Not including BOLT tests since lld is disabled") message(WARNING "Not including BOLT tests since clang is disabled")
endif() endif()
else()
message(WARNING "Not including BOLT tests since clang is disabled")
endif() endif()
endif()
if (BOLT_ENABLE_RUNTIME) if (BOLT_ENABLE_RUNTIME)
message(STATUS "Building BOLT runtime libraries for X86") message(STATUS "Building BOLT runtime libraries for X86")
ExternalProject_Add(bolt_rt ExternalProject_Add(bolt_rt
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/runtime" SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/runtime"
STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-stamps STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-stamps
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-DCMAKE_INSTALL_PREFIX=${LLVM_BINARY_DIR} -DCMAKE_INSTALL_PREFIX=${LLVM_BINARY_DIR}
BUILD_ALWAYS True BUILD_ALWAYS True
)
install(CODE "execute_process\(COMMAND \${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=\${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/cmake_install.cmake \)"
COMPONENT bolt_rt)
add_llvm_install_targets(install-bolt_rt
DEPENDS bolt_rt
COMPONENT bolt_rt)
endif()
# Get the current git revision for BOLT.
find_program(git_executable NAMES git git.exe git.cmd)
if (git_executable)
execute_process(COMMAND ${git_executable} rev-parse HEAD
WORKING_DIRECTORY ${LLVM_MAIN_SRC_DIR}
TIMEOUT 5
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output)
if( git_result EQUAL 0 )
string(STRIP "${git_output}" git_ref_id)
set(BOLT_REVISION "${git_ref_id}")
endif()
endif()
# If we can't find a revision, set it to "<unknown>".
if (NOT BOLT_REVISION)
set(BOLT_REVISION "<unknown>")
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/include/bolt/Utils/BoltRevision.inc.in
${CMAKE_CURRENT_BINARY_DIR}/include/bolt/Utils/BoltRevision.inc)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/include
) )
install(CODE "execute_process\(COMMAND \${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=\${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/cmake_install.cmake \)"
COMPONENT bolt_rt)
add_llvm_install_targets(install-bolt_rt
DEPENDS bolt_rt
COMPONENT bolt_rt)
endif()
# Get the current git revision for BOLT. add_subdirectory(lib)
find_program(git_executable NAMES git git.exe git.cmd) add_subdirectory(tools)
if (git_executable)
execute_process(COMMAND ${git_executable} rev-parse HEAD if (BOLT_INCLUDE_TESTS)
WORKING_DIRECTORY ${LLVM_MAIN_SRC_DIR} add_subdirectory(test)
TIMEOUT 5
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_output)
if( git_result EQUAL 0 )
string(STRIP "${git_output}" git_ref_id)
set(BOLT_REVISION "${git_ref_id}")
endif() endif()
endif() endif()
# If we can't find a revision, set it to "<unknown>".
if (NOT BOLT_REVISION)
set(BOLT_REVISION "<unknown>")
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/include/bolt/Utils/BoltRevision.inc.in
${CMAKE_CURRENT_BINARY_DIR}/include/bolt/Utils/BoltRevision.inc)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/include
)
add_subdirectory(lib)
add_subdirectory(tools)
if (BOLT_INCLUDE_TESTS)
add_subdirectory(test)
endif()