mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Userland: Port wasm to LibMain
This commit is contained in:
parent
05f0f70b00
commit
9aa556fdf0
3 changed files with 6 additions and 4 deletions
|
@ -502,7 +502,7 @@ if (BUILD_LAGOM)
|
||||||
|
|
||||||
add_executable(wasm_lagom ../../Userland/Utilities/wasm.cpp)
|
add_executable(wasm_lagom ../../Userland/Utilities/wasm.cpp)
|
||||||
set_target_properties(wasm_lagom PROPERTIES OUTPUT_NAME wasm)
|
set_target_properties(wasm_lagom PROPERTIES OUTPUT_NAME wasm)
|
||||||
target_link_libraries(wasm_lagom LagomCore LagomWasm LagomLine)
|
target_link_libraries(wasm_lagom LagomCore LagomWasm LagomLine LagomMain)
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
# LibTest
|
# LibTest
|
||||||
|
|
|
@ -160,7 +160,7 @@ target_link_libraries(userdel LibMain)
|
||||||
target_link_libraries(usermod LibMain)
|
target_link_libraries(usermod LibMain)
|
||||||
target_link_libraries(utmpupdate LibMain)
|
target_link_libraries(utmpupdate LibMain)
|
||||||
target_link_libraries(w LibMain)
|
target_link_libraries(w LibMain)
|
||||||
target_link_libraries(wasm LibWasm LibLine)
|
target_link_libraries(wasm LibMain LibWasm LibLine)
|
||||||
target_link_libraries(watch LibMain)
|
target_link_libraries(watch LibMain)
|
||||||
target_link_libraries(wc LibMain)
|
target_link_libraries(wc LibMain)
|
||||||
target_link_libraries(which LibMain)
|
target_link_libraries(which LibMain)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
|
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
#include <LibCore/File.h>
|
#include <LibCore/File.h>
|
||||||
#include <LibCore/FileStream.h>
|
#include <LibCore/FileStream.h>
|
||||||
#include <LibLine/Editor.h>
|
#include <LibLine/Editor.h>
|
||||||
|
#include <LibMain/Main.h>
|
||||||
#include <LibWasm/AbstractMachine/AbstractMachine.h>
|
#include <LibWasm/AbstractMachine/AbstractMachine.h>
|
||||||
#include <LibWasm/AbstractMachine/BytecodeInterpreter.h>
|
#include <LibWasm/AbstractMachine/BytecodeInterpreter.h>
|
||||||
#include <LibWasm/Printer/Printer.h>
|
#include <LibWasm/Printer/Printer.h>
|
||||||
|
@ -265,7 +267,7 @@ static void print_link_error(Wasm::LinkError const& error)
|
||||||
warnln("Missing import '{}'", missing);
|
warnln("Missing import '{}'", missing);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
{
|
{
|
||||||
char const* filename = nullptr;
|
char const* filename = nullptr;
|
||||||
bool print = false;
|
bool print = false;
|
||||||
|
@ -313,7 +315,7 @@ int main(int argc, char* argv[])
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
parser.parse(argc, argv);
|
parser.parse(arguments);
|
||||||
|
|
||||||
if (shell_mode) {
|
if (shell_mode) {
|
||||||
debug = true;
|
debug = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue