Skip to content

Commit 2ea61f6

Browse files
authored
llvm-14: Fix default clang sysroot on macOS (#944)
* Bump to latest tool commits
1 parent 4bc5ded commit 2ea61f6

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

ports/llvm-14/portfile.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES)
137137
-DCLANG_ENABLE_STATIC_ANALYZER=OFF
138138
)
139139
endif()
140+
if(VCPKG_TARGET_IS_WINDOWS)
141+
list(APPEND FEATURE_OPTIONS
142+
# Disable dl library on Windows
143+
-DDL_LIBRARY_PATH:FILEPATH=
144+
)
145+
elseif(VCPKG_TARGET_IS_OSX)
146+
list(APPEND FEATURE_OPTIONS
147+
-DDEFAULT_SYSROOT:FILEPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
148+
-DLLVM_CREATE_XCODE_TOOLCHAIN=ON
149+
)
150+
endif()
140151
# 1) LLVM/Clang tools are relocated from ./bin/ to ./tools/llvm/ (LLVM_TOOLS_INSTALL_DIR=tools/llvm)
141152
# 2) Clang resource files are relocated from ./lib/clang/<version> to ./tools/llvm/lib/clang/<version> (see patch 0007-fix-compiler-rt-install-path.patch)
142153
# So, the relative path should be changed from ../lib/clang/<version> to ./lib/clang/<version>

ports/llvm-14/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "llvm-14",
33
"version": "14.0.3",
4-
"port-version": 2,
4+
"port-version": 3,
55
"description": "The LLVM Compiler Infrastructure.",
66
"homepage": "https://llvm.org",
77
"supports": "!uwp & !(arm & windows)",

0 commit comments

Comments
 (0)