| ... | @@ -512,6 +512,10 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc { | ... | @@ -512,6 +512,10 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc { |
| 512 | target_str = "x86_64-windows"; | 512 | target_str = "x86_64-windows"; |
| 513 | } else if (mem.eql(u8, end_tag_name, "target_linux_x86_64")) { | 513 | } else if (mem.eql(u8, end_tag_name, "target_linux_x86_64")) { |
| 514 | target_str = "x86_64-linux"; | 514 | target_str = "x86_64-linux"; |
| | 515 | } else if (mem.eql(u8, end_tag_name, "target_wasm")) { |
| | 516 | target_str = "wasm32-freestanding"; |
| | 517 | } else if (mem.eql(u8, end_tag_name, "target_wasi")) { |
| | 518 | target_str = "wasm32-wasi"; |
| 515 | } else if (mem.eql(u8, end_tag_name, "link_libc")) { | 519 | } else if (mem.eql(u8, end_tag_name, "link_libc")) { |
| 516 | link_libc = true; | 520 | link_libc = true; |
| 517 | } else if (mem.eql(u8, end_tag_name, "code_end")) { | 521 | } else if (mem.eql(u8, end_tag_name, "code_end")) { |
| ... | @@ -1101,7 +1105,8 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var | ... | @@ -1101,7 +1105,8 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1101 | _ = exec(allocator, &env_map, build_args.toSliceConst()) catch return parseError(tokenizer, code.source_token, "example failed to compile"); | 1105 | _ = exec(allocator, &env_map, build_args.toSliceConst()) catch return parseError(tokenizer, code.source_token, "example failed to compile"); |
| 1102 | | 1106 | |
| 1103 | if (code.target_str) |triple| { | 1107 | if (code.target_str) |triple| { |
| 1104 | if (mem.startsWith(u8, triple, "x86_64-linux") and | 1108 | if (mem.startsWith(u8, triple, "wasm32") or |
| | 1109 | mem.startsWith(u8, triple, "x86_64-linux") and |
| 1105 | (builtin.os != builtin.Os.linux or builtin.arch != builtin.Arch.x86_64)) | 1110 | (builtin.os != builtin.Os.linux or builtin.arch != builtin.Arch.x86_64)) |
| 1106 | { | 1111 | { |
| 1107 | // skip execution | 1112 | // skip execution |