| ... | ... | @@ -1068,6 +1068,9 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1068 | 1068 | } |
| 1069 | 1069 | if (code.target_str) |triple| { |
| 1070 | 1070 | try build_args.appendSlice([][]const u8{ "-target", triple }); |
| 1071 | if (!code.is_inline) { |
| 1072 | try out.print(" -target {}", triple); |
| 1073 | } |
| 1071 | 1074 | } |
| 1072 | 1075 | if (expected_outcome == .BuildFail) { |
| 1073 | 1076 | const result = try os.ChildProcess.exec( |
| ... | ... | @@ -1110,7 +1113,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1110 | 1113 | (builtin.os != builtin.Os.linux or builtin.arch != builtin.Arch.x86_64)) |
| 1111 | 1114 | { |
| 1112 | 1115 | // skip execution |
| 1113 | | try out.print("\n$ # Skipping execution because it is non-native.</code></pre>\n"); |
| 1116 | try out.print("</code></pre>\n"); |
| 1114 | 1117 | break :code_block; |
| 1115 | 1118 | } |
| 1116 | 1119 | } |
| ... | ... | @@ -1174,6 +1177,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1174 | 1177 | } |
| 1175 | 1178 | if (code.target_str) |triple| { |
| 1176 | 1179 | try test_args.appendSlice([][]const u8{ "-target", triple }); |
| 1180 | try out.print(" -target {}", triple); |
| 1177 | 1181 | } |
| 1178 | 1182 | const result = exec(allocator, &env_map, test_args.toSliceConst()) catch return parseError(tokenizer, code.source_token, "test failed"); |
| 1179 | 1183 | const escaped_stderr = try escapeHtml(allocator, result.stderr); |
| ... | ... | @@ -1354,6 +1358,11 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1354 | 1358 | }, |
| 1355 | 1359 | } |
| 1356 | 1360 | |
| 1361 | if (code.target_str) |triple| { |
| 1362 | try build_args.appendSlice([][]const u8{ "-target", triple }); |
| 1363 | try out.print(" -target {}", triple); |
| 1364 | } |
| 1365 | |
| 1357 | 1366 | if (maybe_error_match) |error_match| { |
| 1358 | 1367 | const result = try os.ChildProcess.exec(allocator, build_args.toSliceConst(), null, &env_map, max_doc_file_size); |
| 1359 | 1368 | switch (result.term) { |