From ec545859b988d78506f792b7cbea1582c7311d73 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 29 Sep 2019 14:00:05 -0400 Subject: [PATCH] docgen: support code examples for riscv target --- doc/docgen.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/docgen.zig b/doc/docgen.zig index b3379960a8..c3b8d9ebfd 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -536,6 +536,8 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc { target_str = "x86_64-windows"; } else if (mem.eql(u8, end_tag_name, "target_linux_x86_64")) { target_str = "x86_64-linux"; + } else if (mem.eql(u8, end_tag_name, "target_linux_riscv64")) { + target_str = "riscv64-linux"; } else if (mem.eql(u8, end_tag_name, "target_wasm")) { target_str = "wasm32-freestanding"; } else if (mem.eql(u8, end_tag_name, "target_wasi")) { @@ -1128,6 +1130,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var if (code.target_str) |triple| { if (mem.startsWith(u8, triple, "wasm32") or + mem.startsWith(u8, triple, "riscv64-linux") or mem.startsWith(u8, triple, "x86_64-linux") and (builtin.os != .linux or builtin.arch != .x86_64)) {