@@ -17,7 +17,7 @@ pub fn build(b: *Builder) !void {
17
17
18
18
const rel_zig_exe = try os .path .relative (b .allocator , b .build_root , b .zig_exe );
19
19
const langref_out_path = os .path .join (b .allocator , b .cache_root , "langref.html" ) catch unreachable ;
20
- var docgen_cmd = b .addCommand (null , b .env_map , [][]const u8 . {
20
+ var docgen_cmd = b .addCommand (null , b .env_map , [][]const u8 {
21
21
docgen_exe .getOutputPath (),
22
22
rel_zig_exe ,
23
23
"doc" ++ os .path .sep_str ++ "langref.html.in" ,
@@ -31,12 +31,12 @@ pub fn build(b: *Builder) !void {
31
31
const test_step = b .step ("test" , "Run all the tests" );
32
32
33
33
// find the stage0 build artifacts because we're going to re-use config.h and zig_cpp library
34
- const build_info = try b .exec ([][]const u8 . {
34
+ const build_info = try b .exec ([][]const u8 {
35
35
b .zig_exe ,
36
36
"BUILD_INFO" ,
37
37
});
38
38
var index : usize = 0 ;
39
- var ctx = Context. {
39
+ var ctx = Context {
40
40
.cmake_binary_dir = nextValue (& index , build_info ),
41
41
.cxx_compiler = nextValue (& index , build_info ),
42
42
.llvm_config_exe = nextValue (& index , build_info ),
@@ -162,7 +162,7 @@ fn addCppLib(b: *Builder, lib_exe_obj: var, cmake_binary_dir: []const u8, lib_na
162
162
lib_exe_obj .addObjectFile (os .path .join (b .allocator , cmake_binary_dir , "zig_cpp" , b .fmt ("{}{}{}" , lib_prefix , lib_name , lib_exe_obj .target .libFileExt ())) catch unreachable );
163
163
}
164
164
165
- const LibraryDep = struct . {
165
+ const LibraryDep = struct {
166
166
prefix : []const u8 ,
167
167
libdirs : ArrayList ([]const u8 ),
168
168
libs : ArrayList ([]const u8 ),
@@ -171,24 +171,24 @@ const LibraryDep = struct.{
171
171
};
172
172
173
173
fn findLLVM (b : * Builder , llvm_config_exe : []const u8 ) ! LibraryDep {
174
- const shared_mode = try b .exec ([][]const u8 . { llvm_config_exe , "--shared-mode" });
174
+ const shared_mode = try b .exec ([][]const u8 { llvm_config_exe , "--shared-mode" });
175
175
const is_static = mem .startsWith (u8 , shared_mode , "static" );
176
176
const libs_output = if (is_static )
177
- try b .exec ([][]const u8 . {
177
+ try b .exec ([][]const u8 {
178
178
llvm_config_exe ,
179
179
"--libfiles" ,
180
180
"--system-libs" ,
181
181
})
182
182
else
183
- try b .exec ([][]const u8 . {
183
+ try b .exec ([][]const u8 {
184
184
llvm_config_exe ,
185
185
"--libs" ,
186
186
});
187
- const includes_output = try b .exec ([][]const u8 . { llvm_config_exe , "--includedir" });
188
- const libdir_output = try b .exec ([][]const u8 . { llvm_config_exe , "--libdir" });
189
- const prefix_output = try b .exec ([][]const u8 . { llvm_config_exe , "--prefix" });
187
+ const includes_output = try b .exec ([][]const u8 { llvm_config_exe , "--includedir" });
188
+ const libdir_output = try b .exec ([][]const u8 { llvm_config_exe , "--libdir" });
189
+ const prefix_output = try b .exec ([][]const u8 { llvm_config_exe , "--prefix" });
190
190
191
- var result = LibraryDep. {
191
+ var result = LibraryDep {
192
192
.prefix = mem .split (prefix_output , " \r \n " ).next ().? ,
193
193
.libs = ArrayList ([]const u8 ).init (b .allocator ),
194
194
.system_libs = ArrayList ([]const u8 ).init (b .allocator ),
@@ -328,7 +328,7 @@ fn addCxxKnownPath(
328
328
objname : []const u8 ,
329
329
errtxt : ? []const u8 ,
330
330
) ! void {
331
- const path_padded = try b .exec ([][]const u8 . {
331
+ const path_padded = try b .exec ([][]const u8 {
332
332
ctx .cxx_compiler ,
333
333
b .fmt ("-print-file-name={}" , objname ),
334
334
});
@@ -344,7 +344,7 @@ fn addCxxKnownPath(
344
344
exe .addObjectFile (path_unpadded );
345
345
}
346
346
347
- const Context = struct . {
347
+ const Context = struct {
348
348
cmake_binary_dir : []const u8 ,
349
349
cxx_compiler : []const u8 ,
350
350
llvm_config_exe : []const u8 ,
0 commit comments