From 9c8e4cdc761658f8a9de73c93b40f677178edcb1 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Wed, 30 Oct 2019 14:06:59 +0800 Subject: [llvm]Add features. (#8771) * [llvm]Add features. * [llvm]Add ${FEATURE_OPTIONS}, set feature util to default feature. --- ports/llvm/CONTROL | 13 +++++++++++++ ports/llvm/portfile.cmake | 13 ++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index b48d97660..e1569bdee 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -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. \ No newline at end of file diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 1315f06ac..61f45654c 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -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 -- cgit v1.2.3