Skip to content

Commit

Permalink
fix: make LLVM platform keywords optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 12, 2025
1 parent 95adc35 commit d98f950
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modern/setup-cpp.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modern/setup-cpp.mjs.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/llvm/llvm_url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ async function getAssetKeywords(platform: string, arch: string) {

switch (platform) {
case "win32": {
keywords.push("windows", "Windows")
optionalKeywords.push("windows", "Windows")
if (x86_64.includes(arch)) {
keywords.push("win64", "x86_64", "X64")
optionalKeywords.push("win64", "x86_64", "X64")
// TODO fallback to win32 if win64 is not available (e.g. for LLVM 3.6.2 and older)
} else if (x86.includes(arch)) {
keywords.push("win32")
Expand All @@ -98,7 +98,7 @@ async function getAssetKeywords(platform: string, arch: string) {
break
}
case "linux": {
keywords.push("linux", "Linux")
optionalKeywords.push("linux", "Linux")

if (isUbuntu()) {
optionalKeywords.push("ubuntu")
Expand All @@ -116,7 +116,7 @@ async function getAssetKeywords(platform: string, arch: string) {
}

if (x86_64.includes(arch)) {
keywords.push("x86_64", "X64")
optionalKeywords.push("x86_64", "X64")
} else if (x86.includes(arch)) {
keywords.push("x86")
} else if (arm64.includes(arch)) {
Expand All @@ -135,7 +135,7 @@ async function getAssetKeywords(platform: string, arch: string) {
break
}
case "darwin": {
keywords.push("apple", "macos", "macOS")
optionalKeywords.push("apple", "macos", "macOS")

if (x86_64.includes(arch)) {
keywords.push("x86_64", "X64")
Expand Down

0 comments on commit d98f950

Please sign in to comment.