Fix musl and rust

This commit is contained in:
Ashcon Partovi
2025-04-30 15:59:43 -07:00
parent a95a2eb6b4
commit 32023351f7
2 changed files with 14 additions and 2 deletions

View File

@@ -15,7 +15,11 @@ endif()
if(APPLE)
set(DEFAULT_RUST_TARGET ${DEFAULT_RUST_ARCH}-apple-darwin)
elseif(LINUX)
set(DEFAULT_RUST_TARGET ${DEFAULT_RUST_ARCH}-unknown-linux-gnu)
if(ABI STREQUAL "musl")
set(DEFAULT_RUST_TARGET ${DEFAULT_RUST_ARCH}-unknown-linux-musl)
else()
set(DEFAULT_RUST_TARGET ${DEFAULT_RUST_ARCH}-unknown-linux-gnu)
endif()
elseif(WIN32)
set(DEFAULT_RUST_TARGET ${DEFAULT_RUST_ARCH}-pc-windows-msvc)
else()

View File

@@ -2332,10 +2332,11 @@ function parseLevel(level) {
* @returns {Annotation}
*/
export function parseAnnotation(options, context) {
const cwd = (context?.["cwd"] || process.cwd()).replace(/\\/g, "/");
const source = options["source"];
const level = parseLevel(options["level"]);
const title = options["title"] || (source ? `${source} ${level}` : level);
const filename = options["filename"];
const path = options["filename"]?.replace(/\\/g, "/");
const line = parseInt(options["line"]) || undefined;
const column = parseInt(options["column"]) || undefined;
const content = options["content"];
@@ -2354,6 +2355,13 @@ export function parseAnnotation(options, context) {
relevantLines.push(line);
}
let filename;
if (path?.startsWith(cwd)) {
filename = path.slice(cwd.length + 1);
} else {
filename = path;
}
return {
source,
title,