Skip to content

Commit a2e8632

Browse files
committed
fix: fix llvm 15 on Fedora/Arch
1 parent bd36909 commit a2e8632

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

dist/node12/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node12/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/__tests__/main.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ describe("getVersion", () => {
4848
it("llvm", () => {
4949
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
5050
if (process.platform === "linux") {
51-
expect(getVersion("llvm", "true", [20, 4])).toBe("13.0.0-ubuntu-20.04")
52-
expect(getVersion("llvm", "true", [18, 4])).toBe("13.0.1-ubuntu-18.04")
53-
expect(getVersion("llvm", "true", [16, 4])).toBe("13.0.0-ubuntu-16.04")
51+
expect(getVersion("llvm", "true", [20, 4])).toBe("15.0.6-ubuntu-18.04")
52+
expect(getVersion("llvm", "true", [18, 4])).toBe("15.0.6-ubuntu-18.04")
53+
expect(getVersion("llvm", "true", [16, 4])).toBe("15.0.6-ubuntu-18.04")
5454
}
5555
})
5656
})

src/versions/default_versions.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@ import { isArch } from "../utils/env/isArch"
33
// passing "" to a tool installed by a package manager (apt, brew, choco) will result in the default version of that package manager.
44
// the directly downloaded tools require a given version ("" doesn't work).
55

6+
function getLLVMDefault() {
7+
switch (process.platform) {
8+
case "linux":
9+
// used for non-ubuntu (Fedora, Arch)
10+
return "15.0.6-ubuntu-18.04"
11+
case "darwin":
12+
return "15.0.3"
13+
default:
14+
return "15.0.4"
15+
}
16+
}
17+
618
export const DefaultVersions: Record<string, string> = {
7-
llvm: process.platform === "darwin" ? "15.0.3" : "15.0.4", // https://github.com/llvm/llvm-project/releases
8-
clangtidy: process.platform === "darwin" ? "15.0.3" : "15.0.4",
9-
clangformat: process.platform === "darwin" ? "15.0.3" : "15.0.4",
19+
llvm: getLLVMDefault(), // https://github.com/llvm/llvm-project/releases
20+
clangtidy: getLLVMDefault(),
21+
clangformat: getLLVMDefault(),
1022
ninja: "1.11.1", // https://github.com/ninja-build/ninja/releases
1123
cmake: "3.25.0", // https://github.com/Kitware/CMake/releases
1224
gcovr: "5.2", // https://pypi.org/project/gcovr/

0 commit comments

Comments
 (0)