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 {
3737 ) orelse true ,
3838 };
3939
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+
4046 const options_step = b .addOptions ();
4147 inline for (std .meta .fields (@TypeOf (options ))) | field | {
4248 options_step .addOption (field .type , field .name , @field (options , field .name ));
@@ -233,6 +239,13 @@ pub fn build(b: *std.Build) void {
233239 .flags = c_flags ,
234240 });
235241
242+ for (user_extensions ) | user_extension | {
243+ joltc .addCSourceFile (.{
244+ .file = user_extension ,
245+ .flags = c_flags ,
246+ });
247+ }
248+
236249 if (target .result .abi != .msvc or optimize != .Debug ) {
237250 joltc .addCSourceFiles (.{
238251 .files = &.{
You can’t perform that action at this time.
0 commit comments