diff options
| author | yurybura <yurybura@gmail.com> | 2020-05-15 23:28:48 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-15 13:28:48 -0700 |
| commit | 99a832a16110a75baa699f7c57de522174ce86bf (patch) | |
| tree | c14172482e8d67c6c384c394ee33994ddaf7a2ae | |
| parent | 0b3cc398ac8a48be17f2e35d26a2e6daede6bda4 (diff) | |
| download | vcpkg-99a832a16110a75baa699f7c57de522174ce86bf.tar.gz vcpkg-99a832a16110a75baa699f7c57de522174ce86bf.zip | |
[llvm] add more backend options, fix issues (#11268)
* [llvm] add more backend options, fix #11158
* [llvm] disable optional dependencies to libxml2 and zlib (merge PR #11180)
* [llvm] update version
* [llvm] fix copy-paste typo
* [llvm] disable dl library on Windows, fixes #11309
| -rw-r--r-- | ports/llvm/CONTROL | 29 | ||||
| -rw-r--r-- | ports/llvm/portfile.cmake | 57 |
2 files changed, 78 insertions, 8 deletions
diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 7f8a595a0..24761d11a 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,5 +1,5 @@ Source: llvm -Version: 10.0.0-1 +Version: 10.0.0-2 Homepage: https://llvm.org/ Description: The LLVM Compiler Infrastructure Supports: !uwp @@ -17,15 +17,39 @@ Description: Build with all backends. Feature: target-aarch64 Description: Build with AArch64 backend. +Feature: target-amdgpu +Description: Build with AMDGPU backend. + Feature: target-arm Description: Build with ARM backend. +Feature: target-bpf +Description: Build with BPF backend. + +Feature: target-hexagon +Description: Build with Hexagon backend. + +Feature: target-lanai +Description: Build with Lanai backend. + Feature: target-mips Description: Build with Mips backend. +Feature: target-msp430 +Description: Build with MSP430 backend. + +Feature: target-nvptx +Description: Build with NVPTX backend. + Feature: target-powerpc Description: Build with PowerPC backend. +Feature: target-riscv +Description: Build with RISCV backend. + +Feature: target-sparc +Description: Build with Sparc backend. + Feature: target-systemz Description: Build with SystemZ backend. @@ -35,6 +59,9 @@ Description: Build with WebAssembly backend. Feature: target-x86 Description: Build with X86 backend. +Feature: target-xcore +Description: Build with XCore backend. + Feature: enable-rtti Description: Build LLVM with run-time type information. diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 6d424f5de..414011eee 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -61,6 +61,12 @@ if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES) -DCLANG_ENABLE_STATIC_ANALYZER=OFF ) endif() + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND FEATURE_OPTIONS + # Disable dl library on Windows + -DDL_LIBRARY_PATH:FILEPATH= + ) + endif() endif() if("clang-tools-extra" IN_LIST FEATURES) list(APPEND LLVM_ENABLE_PROJECTS "clang-tools-extra") @@ -93,15 +99,39 @@ else() if("target-aarch64" IN_LIST FEATURES) list(APPEND LLVM_TARGETS_TO_BUILD "AArch64") endif() + if("target-amdgpu" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "AMDGPU") + endif() if("target-arm" IN_LIST FEATURES) list(APPEND LLVM_TARGETS_TO_BUILD "ARM") endif() + if("target-bpf" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "BPF") + endif() + if("target-hexagon" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Hexagon") + endif() + if("target-lanai" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Lanai") + endif() if("target-mips" IN_LIST FEATURES) list(APPEND LLVM_TARGETS_TO_BUILD "Mips") endif() + if("target-msp430" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "MSP430") + endif() + if("target-nvptx" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "NVPTX") + endif() if("target-powerpc" IN_LIST FEATURES) list(APPEND LLVM_TARGETS_TO_BUILD "PowerPC") endif() + if("target-riscv" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "RISCV") + endif() + if("target-sparc" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Sparc") + endif() if("target-systemz" IN_LIST FEATURES) list(APPEND LLVM_TARGETS_TO_BUILD "SystemZ") endif() @@ -111,6 +141,9 @@ else() if("target-x86" IN_LIST FEATURES) list(APPEND LLVM_TARGETS_TO_BUILD "X86") endif() + if("target-xcore" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "XCore") + endif() endif() # Detect target to build if not specified @@ -126,7 +159,7 @@ if("${LLVM_TARGETS_TO_BUILD}" STREQUAL "") endif() endif() -# Use comma-separated string for enabled projects instead of semicolon-separated string. +# Use comma-separated string instead of semicolon-separated string. # See https://github.com/microsoft/vcpkg/issues/4320 string(REPLACE ";" "," LLVM_ENABLE_PROJECTS "${LLVM_ENABLE_PROJECTS}") string(REPLACE ";" "," LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}") @@ -167,11 +200,16 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) vcpkg_fixup_cmake_targets(CONFIG_PATH share/clang TARGET_PATH share/clang) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(GLOB_RECURSE _release_targets + file(GLOB_RECURSE _llvm_release_targets "${CURRENT_PACKAGES_DIR}/share/llvm/*-release.cmake" - "${CURRENT_PACKAGES_DIR}/share/clang/*-release.cmake" ) - foreach(_target IN LISTS _release_targets) + set(_clang_release_targets) + if("clang" IN_LIST FEATURES) + file(GLOB_RECURSE _clang_release_targets + "${CURRENT_PACKAGES_DIR}/share/clang/*-release.cmake" + ) + endif() + foreach(_target IN LISTS _llvm_release_targets _clang_release_targets) file(READ ${_target} _contents) # LLVM tools should be located in the bin folder because llvm-config expects to be inside a bin dir. # Rename `/tools/${PORT}` to `/bin` back because there is no way to avoid this in vcpkg_fixup_cmake_targets. @@ -181,11 +219,16 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB_RECURSE _debug_targets + file(GLOB_RECURSE _llvm_debug_targets "${CURRENT_PACKAGES_DIR}/share/llvm/*-debug.cmake" - "${CURRENT_PACKAGES_DIR}/share/clang/*-debug.cmake" ) - foreach(_target IN LISTS _debug_targets) + set(_clang_debug_targets) + if("clang" IN_LIST FEATURES) + file(GLOB_RECURSE _clang_debug_targets + "${CURRENT_PACKAGES_DIR}/share/clang/*-debug.cmake" + ) + endif() + foreach(_target IN LISTS _llvm_debug_targets _clang_debug_targets) file(READ ${_target} _contents) # LLVM tools should be located in the bin folder because llvm-config expects to be inside a bin dir. # Rename `/tools/${PORT}` to `/bin` back because there is no way to avoid this in vcpkg_fixup_cmake_targets. |
