[llvm]Add features. (#8771)

* [llvm]Add features.

* [llvm]Add ${FEATURE_OPTIONS}, set feature util to default feature.
This commit is contained in:
JackBoosY 2019-10-30 14:06:59 +08:00 committed by Victor Romero
parent be99ba1f5a
commit 9c8e4cdc76
2 changed files with 21 additions and 5 deletions

View File

@ -3,3 +3,16 @@ Version: 8.0.0-3
Homepage: https://llvm.org/
Description: The LLVM Compiler Infrastructure
Build-Depends: atlmfc (windows)
Default-Features: tools, utils
Feature: tools
Description: Generate build targets for the LLVM tools.
Feature: utils
Description: Generate build targets for the LLVM utils.
Feature: example
Description: Generate build targets for the LLVM examples
Feature: test
Description: Generate build targets for the LLVM unit tests.

View File

@ -44,15 +44,18 @@ vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
tools LLVM_INCLUDE_TOOLS
utils LLVM_INCLUDE_UTILS
example LLVM_INCLUDE_EXAMPLES
test LLVM_INCLUDE_TESTS
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
OPTIONS ${FEATURE_OPTIONS}
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_TOOLS=ON
-DLLVM_INCLUDE_UTILS=OFF
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
-DLLVM_TOOLS_INSTALL_DIR=tools/llvm
-DLLVM_PARALLEL_LINK_JOBS=1