@@ -16,6 +16,7 @@ pub fn build(b: *Build) void {
16
16
const optimize = b .standardOptimizeOption (.{});
17
17
18
18
const lang = b .option (Language , "lang" , "Lua language version to build" ) orelse .lua54 ;
19
+ const library_name = b .option ([]const u8 , "library_name" , "Library name for lua linking, default is `lua`" ) orelse null ;
19
20
const shared = b .option (bool , "shared" , "Build shared library instead of static" ) orelse false ;
20
21
const luau_use_4_vector = b .option (bool , "luau_use_4_vector" , "Build Luau to use 4-vectors instead of the default 3-vector." ) orelse false ;
21
22
@@ -31,6 +32,7 @@ pub fn build(b: *Build) void {
31
32
// Expose build configuration to the ziglua module
32
33
const config = b .addOptions ();
33
34
config .addOption (Language , "lang" , lang );
35
+ config .addOption (? []const u8 , "library_name" , library_name );
34
36
config .addOption (bool , "luau_use_4_vector" , luau_use_4_vector );
35
37
zlua .addOptions ("config" , config );
36
38
@@ -43,7 +45,7 @@ pub fn build(b: *Build) void {
43
45
const lib = switch (lang ) {
44
46
.luajit = > luajit_setup .configure (b , target , optimize , upstream , shared ),
45
47
.luau = > luau_setup .configure (b , target , optimize , upstream , luau_use_4_vector ),
46
- else = > lua_setup .configure (b , target , optimize , upstream , lang , shared ),
48
+ else = > lua_setup .configure (b , target , optimize , upstream , lang , shared , library_name ),
47
49
};
48
50
49
51
// Expose the Lua artifact, and get an install step that header translation can refer to
0 commit comments