File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ pub fn build(b: *std.Build) void {
37
37
) orelse true ,
38
38
};
39
39
40
+ const user_extensions = b .option (
41
+ []const std .Build .LazyPath ,
42
+ "user_extensions" ,
43
+ "List of user source files to add to the joltc library" ,
44
+ ) orelse &.{};
45
+
40
46
const options_step = b .addOptions ();
41
47
inline for (std .meta .fields (@TypeOf (options ))) | field | {
42
48
options_step .addOption (field .type , field .name , @field (options , field .name ));
@@ -233,6 +239,13 @@ pub fn build(b: *std.Build) void {
233
239
.flags = c_flags ,
234
240
});
235
241
242
+ for (user_extensions ) | user_extension | {
243
+ joltc .addCSourceFile (.{
244
+ .file = user_extension ,
245
+ .flags = c_flags ,
246
+ });
247
+ }
248
+
236
249
if (target .result .abi != .msvc or optimize != .Debug ) {
237
250
joltc .addCSourceFiles (.{
238
251
.files = &.{
You can’t perform that action at this time.
0 commit comments