ols: dev-2026-06 -> dev-2026-08, temp fix for new asm syntax

This commit is contained in:
Christopher Kaster
2026-09-03 19:13:13 +02:00
parent 62e8e47412
commit 26aaa04ce5
2 changed files with 33 additions and 2 deletions

View File

@@ -8,15 +8,19 @@
stdenv.mkDerivation (finalAttrs: {
pname = "ols";
version = "dev-2026-06";
version = "dev-2026-08";
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
tag = finalAttrs.version;
hash = "sha256-BqLaPVntNzK5N3lffjn4umLhqSM0bOcAVgzk+f13BKM=";
hash = "sha256-dRMDb5RO0yCSOcLeDXk1nkAXaj1mqliuhktpKq4XwUI=";
};
patches = [
./temp-fix-asm-syntax.diff
];
postPatch = ''
substituteInPlace build.sh \
--replace-fail "-microarch:native" ""

View File

@@ -0,0 +1,27 @@
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin
index 8c22780f..144d8ba4 100644
--- a/src/odin/printer/visit.odin
+++ b/src/odin/printer/visit.odin
@@ -1464,19 +1464,9 @@ visit_expr :: proc(
document := empty()
#partial switch v in expr.derived {
- case ^ast.Inline_Asm_Expr:
- document = cons(text_token(p, v.tok), text("("), visit_exprs(p, v.param_types, {.Add_Comma}), text(")"))
- document = cons_with_opl(document, cons(text("-"), text(">")))
- document = cons_with_opl(document, visit_expr(p, v.return_type))
-
- document = cons(
- document,
- text("{"),
- visit_expr(p, v.asm_string),
- text(","),
- visit_expr(p, v.constraints_string),
- text("}"),
- )
+ case ^ast.Asm_Template:
+ // TODO: new `asm` syntax support
+ document = text(p.src[v.pos.offset:v.end.offset])
case ^ast.Undef:
document = text("---")
case ^ast.Auto_Cast: