Skip to content

Commit 0588805

Browse files
committed
Build luauconfig library
1 parent 1503aca commit 0588805

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/lib.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl Build {
138138
.out_dir(&build_dir)
139139
.compile(ast_lib_name);
140140

141-
// Build `CogeGen` library
141+
// Build `CodeGen` library
142142
let codegen_lib_name = "luaucodegen";
143143
let codegen_source_dir = source_base_dir.join("luau").join("CodeGen").join("src");
144144
let codegen_include_dir = source_base_dir.join("luau").join("CodeGen").join("include");
@@ -171,6 +171,20 @@ impl Build {
171171
.out_dir(&build_dir)
172172
.compile(compiler_lib_name);
173173

174+
// Build `Config` library
175+
let config_lib_name = "luauconfig";
176+
let config_source_dir = source_base_dir.join("luau").join("Config").join("src");
177+
let config_include_dir = source_base_dir.join("luau").join("Config").join("include");
178+
config
179+
.clone()
180+
.include(&config_include_dir)
181+
.include(&ast_include_dir)
182+
.include(&compiler_include_dir)
183+
.include(&vm_include_dir)
184+
.add_files_by_ext_sorted(&config_source_dir, "cpp")
185+
.out_dir(&build_dir)
186+
.compile(config_lib_name);
187+
174188
// Build customization library
175189
let custom_lib_name = "luaucustom";
176190
let custom_source_dir = source_base_dir.join("luau").join("Custom").join("src");
@@ -188,12 +202,10 @@ impl Build {
188202
let require_source_dirs = &[
189203
require_base_dir.join("Navigator").join("src"),
190204
require_base_dir.join("Runtime").join("src"),
191-
source_base_dir.join("luau").join("Config").join("src"),
192205
];
193206
let require_include_dirs = &[
194207
require_base_dir.join("Navigator").join("include"),
195208
require_base_dir.join("Runtime").join("include"),
196-
source_base_dir.join("luau").join("Config").join("include"),
197209
];
198210
let mut require_config = config.clone();
199211
for (source_dir, include_dir) in require_source_dirs.iter().zip(require_include_dirs) {
@@ -203,6 +215,7 @@ impl Build {
203215
}
204216
require_config
205217
.include(&ast_include_dir)
218+
.include(&config_include_dir)
206219
.include(&vm_include_dir)
207220
.out_dir(&build_dir)
208221
.compile(require_lib_name);
@@ -223,6 +236,7 @@ impl Build {
223236
compiler_lib_name.to_string(),
224237
ast_lib_name.to_string(),
225238
custom_lib_name.to_string(),
239+
config_lib_name.to_string(),
226240
require_lib_name.to_string(),
227241
],
228242
cpp_stdlib: Self::get_cpp_link_stdlib(target, host),

0 commit comments

Comments
 (0)