mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix musl and rust
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user