Disable build burden (LLVM) locally
This commit is contained in:
parent
ea56f55629
commit
969f9a3700
@ -32,6 +32,8 @@ else()
|
|||||||
message(STATUS "CMake is not run on CI")
|
message(STATUS "CMake is not run on CI")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set (USE_LLVM ${BB_IS_CI} CACHE BOOL "Variable that determines if LLVM should be linked to the target")
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-pedantic
|
-pedantic
|
||||||
-Wall -Wextra -Wpedantic
|
-Wall -Wextra -Wpedantic
|
||||||
@ -43,6 +45,26 @@ add_compile_options(
|
|||||||
)
|
)
|
||||||
include_directories("bootstrap/include")
|
include_directories("bootstrap/include")
|
||||||
|
|
||||||
|
add_library("${LIBRARY_NAME}"
|
||||||
|
"bootstrap/std/base.c"
|
||||||
|
"bootstrap/std/string.c"
|
||||||
|
"bootstrap/std/os.c"
|
||||||
|
"bootstrap/std/entry_point.c"
|
||||||
|
"bootstrap/std/virtual_buffer.c"
|
||||||
|
"bootstrap/std/md5.c"
|
||||||
|
"bootstrap/std/sha1.c"
|
||||||
|
)
|
||||||
|
add_executable("${RUNNER_NAME}" "bootstrap/runner/runner.c")
|
||||||
|
target_link_libraries(${RUNNER_NAME} PRIVATE ${LIBRARY_NAME})
|
||||||
|
|
||||||
|
add_executable("${COMPILER_NAME}"
|
||||||
|
"bootstrap/bloat-buster/main.c"
|
||||||
|
"bootstrap/bloat-buster/pdb_image.c"
|
||||||
|
"bootstrap/bloat-buster/gui.c"
|
||||||
|
)
|
||||||
|
target_link_libraries(${COMPILER_NAME} PRIVATE ${LIBRARY_NAME})
|
||||||
|
|
||||||
|
if (USE_LLVM)
|
||||||
find_package(LLVM REQUIRED CONFIG)
|
find_package(LLVM REQUIRED CONFIG)
|
||||||
|
|
||||||
find_program(LLVM_CONFIG_EXE
|
find_program(LLVM_CONFIG_EXE
|
||||||
@ -147,32 +169,18 @@ endif()
|
|||||||
|
|
||||||
link_directories("${LLVM_LIBDIRS}")
|
link_directories("${LLVM_LIBDIRS}")
|
||||||
|
|
||||||
add_library("${LIBRARY_NAME}"
|
|
||||||
"bootstrap/std/base.c"
|
|
||||||
"bootstrap/std/string.c"
|
|
||||||
"bootstrap/std/os.c"
|
|
||||||
"bootstrap/std/entry_point.c"
|
|
||||||
"bootstrap/std/virtual_buffer.c"
|
|
||||||
"bootstrap/std/md5.c"
|
|
||||||
"bootstrap/std/sha1.c"
|
|
||||||
)
|
|
||||||
add_executable("${RUNNER_NAME}" "bootstrap/runner/runner.c")
|
|
||||||
target_link_libraries(${RUNNER_NAME} PRIVATE ${LIBRARY_NAME})
|
|
||||||
|
|
||||||
add_executable("${COMPILER_NAME}"
|
|
||||||
"bootstrap/bloat-buster/main.c"
|
|
||||||
"bootstrap/bloat-buster/pdb_image.c"
|
|
||||||
"bootstrap/bloat-buster/llvm.cpp"
|
|
||||||
"bootstrap/bloat-buster/lld_driver.c"
|
|
||||||
"bootstrap/bloat-buster/lld_api.cpp"
|
|
||||||
"bootstrap/bloat-buster/gui.c"
|
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_definitions(${COMPILER_NAME} PRIVATE ${LLVM_DEFINITIONS})
|
target_compile_definitions(${COMPILER_NAME} PRIVATE ${LLVM_DEFINITIONS})
|
||||||
cmake_print_variables("LLVM definitions: ${LLVM_DEFINITIONS}")
|
cmake_print_variables("LLVM definitions: ${LLVM_DEFINITIONS}")
|
||||||
target_include_directories(${COMPILER_NAME} PRIVATE ${LLVM_INCLUDE_DIRS})
|
target_include_directories(${COMPILER_NAME} PRIVATE ${LLVM_INCLUDE_DIRS})
|
||||||
target_link_directories(${COMPILER_NAME} PRIVATE ${LLVM_LIBRARY_DIRS})
|
target_link_directories(${COMPILER_NAME} PRIVATE ${LLVM_LIBRARY_DIRS})
|
||||||
target_link_libraries(${COMPILER_NAME} PRIVATE ${LIBRARY_NAME} ${LLVM_LIBRARIES} ${lld_libs})
|
target_link_libraries(${COMPILER_NAME} PRIVATE ${LLVM_LIBRARIES} ${lld_libs})
|
||||||
|
target_sources(${COMPILER_NAME} PRIVATE
|
||||||
|
"bootstrap/bloat-buster/llvm.cpp"
|
||||||
|
"bootstrap/bloat-buster/lld_driver.c"
|
||||||
|
"bootstrap/bloat-buster/lld_api.cpp"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (NOT BB_IS_CI)
|
if (NOT BB_IS_CI)
|
||||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user