@@ -36,6 +36,18 @@ pub fn compile_c(mut b builder.Builder) {
36
36
}
37
37
}
38
38
39
+ pub fn build_c (mut b builder.Builder, v_files []string , out_file string ) {
40
+ b.out_name_c = out_file
41
+ b.pref.out_name_c = os.real_path (out_file)
42
+ b.info ('build_c(${out_file} )' )
43
+ output2 := gen_c (mut b, v_files)
44
+ os.write_file (out_file, output2 ) or { panic (err) }
45
+ if b.pref.is_stats {
46
+ b.stats_lines = output2 .count ('\n ' ) + 1
47
+ b.stats_bytes = output2 .len
48
+ }
49
+ }
50
+
39
51
pub fn gen_c (mut b builder.Builder, v_files []string ) string {
40
52
b.front_and_middle_stages (v_files) or {
41
53
if err.code () > 7000 {
@@ -56,15 +68,3 @@ pub fn gen_c(mut b builder.Builder, v_files []string) string {
56
68
57
69
return res
58
70
}
59
-
60
- pub fn build_c (mut b builder.Builder, v_files []string , out_file string ) {
61
- b.out_name_c = out_file
62
- b.pref.out_name_c = os.real_path (out_file)
63
- b.info ('build_c(${out_file} )' )
64
- output2 := gen_c (mut b, v_files)
65
- os.write_file (out_file, output2 ) or { panic (err) }
66
- if b.pref.is_stats {
67
- b.stats_lines = output2 .count ('\n ' ) + 1
68
- b.stats_bytes = output2 .len
69
- }
70
- }
0 commit comments