Skip to content

Commit 8457d39

Browse files
committed
Additional system headers as slice of LazyPath
1 parent d59103e commit 8457d39

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

build.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn build(b: *Build) void {
4141
const system_lua = b.option(bool, "system_lua", "Use system lua") orelse false;
4242
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;
4343
const lua_user_h = b.option(Build.LazyPath, "lua_user_h", "Lazy path to user supplied c header file") orelse null;
44-
const additional_system_headers = b.option(Build.LazyPath, "additional_system_headers", "Lazy path to additional system headers to include when building Lua") orelse null;
44+
const additional_system_headers = b.option([]Build.LazyPath, "additional_system_headers", "Slice of Lazy paths to additional system headers to include when building Lua") orelse null;
4545
const api_check = b.option(ApiCheck, "apicheck", "Enable parameter checks in the Lua API") orelse .debug;
4646

4747
if (lang == .luau and shared) {
@@ -87,9 +87,9 @@ pub fn build(b: *Build) void {
8787

8888
// If we've been given additional system headers, add them now.
8989
// Useful for things like linking Emscripten headers by including a new sysroot
90-
if (additional_system_headers) |headers| {
91-
t.addSystemIncludePath(headers);
92-
}
90+
if (additional_system_headers) |include_paths| for (include_paths) |include_path| {
91+
t.addSystemIncludePath(include_path);
92+
};
9393

9494
zlua.addImport("c", t.mod);
9595

0 commit comments

Comments
 (0)