| ... | ... | @@ -1096,6 +1096,9 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1096 | 1096 | try build_args.append("-lc"); |
| 1097 | 1097 | try out.print(" -lc", .{}); |
| 1098 | 1098 | } |
| 1099 | const target = try std.zig.CrossTarget.parse(.{ |
| 1100 | .arch_os_abi = code.target_str orelse "native", |
| 1101 | }); |
| 1099 | 1102 | if (code.target_str) |triple| { |
| 1100 | 1103 | try build_args.appendSlice(&[_][]const u8{ "-target", triple }); |
| 1101 | 1104 | if (!code.is_inline) { |
| ... | ... | @@ -1150,7 +1153,15 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1150 | 1153 | } |
| 1151 | 1154 | } |
| 1152 | 1155 | |
| 1153 | | const path_to_exe = mem.trim(u8, exec_result.stdout, " \r\n"); |
| 1156 | const path_to_exe_dir = mem.trim(u8, exec_result.stdout, " \r\n"); |
| 1157 | const path_to_exe_basename = try std.fmt.allocPrint(allocator, "{}{}", .{ |
| 1158 | code.name, |
| 1159 | target.exeFileExt(), |
| 1160 | }); |
| 1161 | const path_to_exe = try fs.path.join(allocator, &[_][]const u8{ |
| 1162 | path_to_exe_dir, |
| 1163 | path_to_exe_basename, |
| 1164 | }); |
| 1154 | 1165 | const run_args = &[_][]const u8{path_to_exe}; |
| 1155 | 1166 | |
| 1156 | 1167 | var exited_with_signal = false; |
| ... | ... | @@ -1486,7 +1497,12 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var |
| 1486 | 1497 | } |
| 1487 | 1498 | |
| 1488 | 1499 | fn exec(allocator: *mem.Allocator, env_map: *std.BufMap, args: []const []const u8) !ChildProcess.ExecResult { |
| 1489 | | const result = try ChildProcess.exec(allocator, args, null, env_map, max_doc_file_size); |
| 1500 | const result = try ChildProcess.exec2(.{ |
| 1501 | .allocator = allocator, |
| 1502 | .argv = args, |
| 1503 | .env_map = env_map, |
| 1504 | .max_output_bytes = max_doc_file_size, |
| 1505 | }); |
| 1490 | 1506 | switch (result.term) { |
| 1491 | 1507 | .Exited => |exit_code| { |
| 1492 | 1508 | if (exit_code != 0) { |