Skip to content

Commit

Permalink
[llvm] fix clang rescource dir (microsoft#34801)
Browse files Browse the repository at this point in the history
* [llvm] fix clang rescource dir.

* v db

* fix core feature

* v db
  • Loading branch information
Neumann-A authored Nov 1, 2023
1 parent 88818ef commit 0dc005f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
8 changes: 6 additions & 2 deletions ports/llvm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES)
# 1) LLVM/Clang tools are relocated from ./bin/ to ./tools/llvm/ (CLANG_TOOLS_INSTALL_DIR=tools/llvm)
# 2) Clang resource files should be relocated from lib/clang/<major_version> to ../tools/llvm/lib/clang/<major_version>
string(REGEX MATCH "^[0-9]+" CLANG_VERSION_MAJOR ${VERSION})
list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=../tools/llvm/lib/clang/${CLANG_VERSION_MAJOR})
list(APPEND FEATURE_OPTIONS -DCLANG_RESOURCE_DIR=lib/clang/${CLANG_VERSION_MAJOR})
endif()
if("clang-tools-extra" IN_LIST FEATURES)
list(APPEND LLVM_ENABLE_PROJECTS "clang-tools-extra")
Expand Down Expand Up @@ -366,7 +366,11 @@ if(empty_dirs)
endforeach()
endif()

vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/lib")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/lib" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/lib")
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
Expand Down
1 change: 1 addition & 0 deletions ports/llvm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "llvm",
"version": "17.0.2",
"port-version": 1,
"description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5182,7 +5182,7 @@
},
"llvm": {
"baseline": "17.0.2",
"port-version": 0
"port-version": 1
},
"lmdb": {
"baseline": "0.9.31",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/llvm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3d195e85c468428553d0aed0eeb76e3714231e3a",
"version": "17.0.2",
"port-version": 1
},
{
"git-tree": "7bbd8fe3bd9dd7f507ec0b0713c5de3109d312b5",
"version": "17.0.2",
Expand Down

0 comments on commit 0dc005f

Please sign in to comment.