mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Meta+LibWeb: Pass IDL files to codegen using response file on Windows
It might be a good idea to do this on other platforms as well, but at least on Windows, the command line for GenerateWindowOrWorkerInterfaces becomes too large.
This commit is contained in:
parent
06ff47749f
commit
80c259125c
Notes:
github-actions[bot]
2025-02-13 02:15:07 +00:00
Author: https://github.com/ADKaster
Commit: 80c259125c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3551
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/shannonbooth
2 changed files with 27 additions and 1 deletions
|
@ -356,6 +356,25 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
VERIFY(!paths.is_empty());
|
||||
VERIFY(!base_paths.is_empty());
|
||||
|
||||
if (paths.first().starts_with("@"sv)) {
|
||||
// Response file
|
||||
auto file_or_error = Core::File::open(paths.first().substring_view(1), Core::File::OpenMode::Read);
|
||||
paths.remove(0);
|
||||
VERIFY(paths.is_empty());
|
||||
|
||||
if (file_or_error.is_error()) {
|
||||
s_error_string = ByteString::formatted("Unable to open response file {}", paths.first());
|
||||
return Error::from_string_view(s_error_string.view());
|
||||
}
|
||||
auto file = file_or_error.release_value();
|
||||
auto string = TRY(file->read_until_eof());
|
||||
for (auto const& path : StringView(string).split_view('\n')) {
|
||||
if (path.is_empty())
|
||||
continue;
|
||||
paths.append(path);
|
||||
}
|
||||
}
|
||||
|
||||
Vector<ByteString> lexical_bases;
|
||||
for (auto const& base_path : base_paths) {
|
||||
VERIFY(!base_path.is_empty());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue