| ... | @@ -505,7 +505,6 @@ pub const Builder = struct { | ... | @@ -505,7 +505,6 @@ pub const Builder = struct { |
| 505 | }; | 505 | }; |
| 506 | | 506 | |
| 507 | const term = child.wait() %% |err| { | 507 | const term = child.wait() %% |err| { |
| 508 | test (cwd) |yes_cwd| %%io.stderr.printf("cwd: {}\n", yes_cwd); | | |
| 509 | %%io.stderr.printf("Unable to spawn {}: {}\n", exe_path, @errorName(err)); | 508 | %%io.stderr.printf("Unable to spawn {}: {}\n", exe_path, @errorName(err)); |
| 510 | return err; | 509 | return err; |
| 511 | }; | 510 | }; |
| ... | @@ -1213,11 +1212,11 @@ pub const CLibExeObjStep = struct { | ... | @@ -1213,11 +1212,11 @@ pub const CLibExeObjStep = struct { |
| 1213 | %%cc_args.append("-fPIC"); | 1212 | %%cc_args.append("-fPIC"); |
| 1214 | } | 1213 | } |
| 1215 | | 1214 | |
| | 1215 | const abs_source_file = builder.pathFromRoot(source_file); |
| 1216 | %%cc_args.append("-c"); | 1216 | %%cc_args.append("-c"); |
| 1217 | %%cc_args.append(source_file); | 1217 | %%cc_args.append(abs_source_file); |
| 1218 | | 1218 | |
| 1219 | const rel_src_path = %%os.path.relative(builder.allocator, builder.build_root, source_file); | 1219 | const cache_o_src = %%os.path.join(builder.allocator, builder.cache_root, source_file); |
| 1220 | const cache_o_src = %%os.path.join(builder.allocator, builder.cache_root, rel_src_path); | | |
| 1221 | const cache_o_dir = os.path.dirname(cache_o_src); | 1220 | const cache_o_dir = os.path.dirname(cache_o_src); |
| 1222 | %return builder.makePath(cache_o_dir); | 1221 | %return builder.makePath(cache_o_dir); |
| 1223 | const cache_o_file = builder.fmt("{}{}", cache_o_src, self.target.oFileExt()); | 1222 | const cache_o_file = builder.fmt("{}{}", cache_o_src, self.target.oFileExt()); |
| ... | @@ -1230,7 +1229,7 @@ pub const CLibExeObjStep = struct { | ... | @@ -1230,7 +1229,7 @@ pub const CLibExeObjStep = struct { |
| 1230 | | 1229 | |
| 1231 | for (self.include_dirs.toSliceConst()) |dir| { | 1230 | for (self.include_dirs.toSliceConst()) |dir| { |
| 1232 | %%cc_args.append("-I"); | 1231 | %%cc_args.append("-I"); |
| 1233 | %%cc_args.append(dir); | 1232 | %%cc_args.append(builder.pathFromRoot(dir)); |
| 1234 | } | 1233 | } |
| 1235 | | 1234 | |
| 1236 | %return builder.spawnChild(cc, cc_args.toSliceConst()); | 1235 | %return builder.spawnChild(cc, cc_args.toSliceConst()); |
| ... | @@ -1279,11 +1278,11 @@ pub const CLibExeObjStep = struct { | ... | @@ -1279,11 +1278,11 @@ pub const CLibExeObjStep = struct { |
| 1279 | for (self.source_files.toSliceConst()) |source_file| { | 1278 | for (self.source_files.toSliceConst()) |source_file| { |
| 1280 | %%cc_args.resize(0); | 1279 | %%cc_args.resize(0); |
| 1281 | | 1280 | |
| | 1281 | const abs_source_file = builder.pathFromRoot(source_file); |
| 1282 | %%cc_args.append("-c"); | 1282 | %%cc_args.append("-c"); |
| 1283 | %%cc_args.append(builder.pathFromRoot(source_file)); | 1283 | %%cc_args.append(abs_source_file); |
| 1284 | | 1284 | |
| 1285 | const rel_src_path = %%os.path.relative(builder.allocator, builder.build_root, source_file); | 1285 | const cache_o_src = %%os.path.join(builder.allocator, builder.cache_root, source_file); |
| 1286 | const cache_o_src = %%os.path.join(builder.allocator, builder.cache_root, rel_src_path); | | |
| 1287 | const cache_o_dir = os.path.dirname(cache_o_src); | 1286 | const cache_o_dir = os.path.dirname(cache_o_src); |
| 1288 | %return builder.makePath(cache_o_dir); | 1287 | %return builder.makePath(cache_o_dir); |
| 1289 | const cache_o_file = builder.fmt("{}{}", cache_o_src, self.target.oFileExt()); | 1288 | const cache_o_file = builder.fmt("{}{}", cache_o_src, self.target.oFileExt()); |
| ... | @@ -1324,6 +1323,8 @@ pub const CLibExeObjStep = struct { | ... | @@ -1324,6 +1323,8 @@ pub const CLibExeObjStep = struct { |
| 1324 | for (self.full_path_libs.toSliceConst()) |full_path_lib| { | 1323 | for (self.full_path_libs.toSliceConst()) |full_path_lib| { |
| 1325 | %%cc_args.append(builder.pathFromRoot(full_path_lib)); | 1324 | %%cc_args.append(builder.pathFromRoot(full_path_lib)); |
| 1326 | } | 1325 | } |
| | 1326 | |
| | 1327 | %return builder.spawnChild(cc, cc_args.toSliceConst()); |
| 1327 | }, | 1328 | }, |
| 1328 | } | 1329 | } |
| 1329 | } | 1330 | } |