Skip to content

Commit

Permalink
perf: add abi for rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed May 10, 2024
1 parent 53a8797 commit 2cd0cb6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions conf/loongarch-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
},
"linux": {
"target": [
"deb",
"rpm"
"rpm",
"deb"
],
"maintainer": "msojocs <jiyecafe@gmail.com> (https://www.jysafe.cn)",
"icon": "res/icons",
Expand Down
17 changes: 15 additions & 2 deletions tools/fix-build-loongarch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const fixBuildUtil = () => {
archJs = archJs.replace(
'"aarch64" : "arm64";\n',
`"aarch64" : "arm64";// loongarch64\ncase Arch.loong64:
return targetName === "pacman" || targetName === "rpm" || targetName === "flatpak" ? "loong64" : "loong64";
return targetName === "rpm" ? "loongarch64_abi1" : "loong64";
case Arch.loongarch64:
return targetName === "pacman" || targetName === "rpm" || targetName === "flatpak" ? "loongarch64" : "loongarch64";
return targetName === "rpm" ? "loongarch64_abi2" : "loongarch64";
`
)
archJs = archJs.replace(
Expand All @@ -29,6 +29,19 @@ const fixBuildUtil = () => {
'return Arch.arm64;\n',
'return Arch.arm64;// loongarch64\ncase "loongarch64":\nreturn Arch.loongarch64;case "loong64":\nreturn Arch.loong64;\n'
)
archJs = archJs.replace(
'else if (arch === Arch.arm64) {\n',
`else if (arch === Arch.loongarch64) {
if (ext === "rpm") {
archName = "loongarch64_abi1";
}
} else if (arch === Arch.loong64) {
if (ext === "rpm") {
archName = "loongarch64_abi2";
}
}
else if (arch === Arch.arm64) {// loongarch64\n`
)
fs.writeFileSync(archJsPath, archJs)
}
}
Expand Down

0 comments on commit 2cd0cb6

Please sign in to comment.