mirror of https://github.com/aminya/setup-cpp
fix: use the os version when choosing gcc for llvm
This commit is contained in:
parent
144da62f5a
commit
44b95bad75
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -13,6 +13,7 @@ import { setupGcc } from "../gcc/gcc"
|
||||||
import { getVersion } from "../versions/versions"
|
import { getVersion } from "../versions/versions"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu"
|
import { isUbuntu } from "../utils/env/isUbuntu"
|
||||||
import { getLLVMPackageInfo } from "./llvm_url"
|
import { getLLVMPackageInfo } from "./llvm_url"
|
||||||
|
import { ubuntuVersion } from "../utils/env/ubuntu_version"
|
||||||
|
|
||||||
export async function setupLLVM(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
export async function setupLLVM(version: string, setupDir: string, arch: string): Promise<InstallationInfo> {
|
||||||
const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)
|
const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)
|
||||||
|
@ -44,7 +45,8 @@ async function setupLLVMWithoutActivation(version: string, setupDir: string, arc
|
||||||
async function setupLLVMDeps(arch: string) {
|
async function setupLLVMDeps(arch: string) {
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
// install llvm build dependencies
|
// install llvm build dependencies
|
||||||
await setupGcc(getVersion("gcc", undefined), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
|
const osVersion = await ubuntuVersion()
|
||||||
|
await setupGcc(getVersion("gcc", undefined, osVersion), "", arch) // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first
|
||||||
|
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
await setupAptPack("libtinfo-dev")
|
await setupAptPack("libtinfo-dev")
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const DefaultVersions: Record<string, string> = {
|
||||||
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
|
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
|
||||||
task: "3.18.0", // https://github.com/go-task/task/releases
|
task: "3.18.0", // https://github.com/go-task/task/releases
|
||||||
doxygen: isArch() ? "1.9.5-1" : "1.9.5", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
|
doxygen: isArch() ? "1.9.5-1" : "1.9.5", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
|
||||||
gcc: "12", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
gcc: isArch() ? "11" : "12", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If an ubuntu versions is not in this map:
|
/// If an ubuntu versions is not in this map:
|
||||||
|
|
Loading…
Reference in New Issue