LibWasm: Enable EXPLICIT_SYMBOL_EXPORT

This commit is contained in:
ayeteadoe 2025-08-07 13:47:21 -07:00 committed by Andrew Kaster
commit 070392307a
Notes: github-actions[bot] 2025-08-24 19:00:26 +00:00
4 changed files with 10 additions and 7 deletions

View file

@ -13,6 +13,7 @@
#include <AK/NonnullOwnPtr.h>
#include <AK/StackInfo.h>
#include <AK/UFixedBigInt.h>
#include <LibWasm/Export.h>
#include <LibWasm/Types.h>
namespace Wasm {
@ -551,7 +552,7 @@ private:
Vector<Reference> m_references;
};
class Store {
class WASM_API Store {
public:
Store() = default;
@ -631,7 +632,7 @@ struct HostVisitOps {
Function<void(ExternallyManagedTrap&)> visit_trap;
};
class AbstractMachine {
class WASM_API AbstractMachine {
public:
explicit AbstractMachine() = default;
@ -682,7 +683,7 @@ private:
bool m_should_limit_instruction_count { false };
};
class Linker {
class WASM_API Linker {
public:
struct Name {
ByteString module;

View file

@ -11,7 +11,7 @@ if (NOT WIN32)
list(APPEND SOURCES WASI/Wasi.cpp)
endif()
ladybird_lib(LibWasm wasm)
ladybird_lib(LibWasm wasm EXPLICIT_SYMBOL_EXPORT)
target_link_libraries(LibWasm PRIVATE LibCore)
include(wasm_spec_tests)

View file

@ -16,6 +16,7 @@
#include <AK/Variant.h>
#include <AK/WeakPtr.h>
#include <LibWasm/Constants.h>
#include <LibWasm/Export.h>
#include <LibWasm/Forward.h>
#include <LibWasm/Opcode.h>
@ -61,7 +62,7 @@ enum class ParseError {
SectionOutOfOrder,
};
ByteString parse_error_to_byte_string(ParseError);
WASM_API ByteString parse_error_to_byte_string(ParseError);
template<typename T>
using ParseResult = ErrorOr<T, ParseError>;
@ -1035,7 +1036,7 @@ private:
Optional<u32> m_count;
};
class Module : public RefCounted<Module>
class WASM_API Module : public RefCounted<Module>
, public Weakable<Module> {
public:
enum class ValidationStatus {

View file

@ -14,6 +14,7 @@
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibWasm/AbstractMachine/AbstractMachine.h>
#include <LibWasm/Export.h>
#include <LibWasm/Forward.h>
namespace Wasm::Wasi::ABI {
@ -821,7 +822,7 @@ private:
LittleEndian<Tag> tag;
};
struct Implementation {
struct WASM_API Implementation {
struct MappedPath {
LexicalPath host_path;
LexicalPath mapped_path;