diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 2cfc021..49d143d 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -47,7 +47,7 @@ if (USE_MOLD) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=/usr/local/bin/mold") endif() elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld-18") endif() add_subdirectory(../ext ext) diff --git a/engine/build.sh b/engine/build.sh index 4fd799b..b3b504b 100755 --- a/engine/build.sh +++ b/engine/build.sh @@ -16,7 +16,7 @@ CC=$ENGINE_CC # Build the game mkdir -p build pushd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DFLTO=ON -DSANITIZE=OFF -DRISCV_EXT_C=$CEXT +cmake .. -DCMAKE_BUILD_TYPE=Release -DSANITIZE=OFF -DRISCV_EXT_C=$CEXT make -j4 popd diff --git a/engine/libtcc1.a b/engine/libtcc1.a new file mode 120000 index 0000000..7891421 --- /dev/null +++ b/engine/libtcc1.a @@ -0,0 +1 @@ +build/libtcc1.a \ No newline at end of file diff --git a/engine/src/script/event.hpp b/engine/src/script/event.hpp index 333f297..cc2e3c2 100644 --- a/engine/src/script/event.hpp +++ b/engine/src/script/event.hpp @@ -53,12 +53,12 @@ struct Event } private: - riscv::PreparedCall m_pcall; + riscv::PreparedCall m_pcall; }; template inline Event::Event(Script& script, Script::gaddr_t address) - : m_pcall(script.machine(), address) + : m_pcall((Usage == SharedScript) ? script.machine() : script.get_fork().machine(), address) { } @@ -77,7 +77,7 @@ template inline auto Event::call(Args&&... args) using Ret = decltype((F*){}(args...)); auto& script = this->script(); - if (auto res = script.template prepared_call(m_pcall, std::forward(args)...)) { + if (auto res = script.template prepared_call(m_pcall, std::forward(args)...)) { if constexpr (std::is_same_v) return true; else if constexpr (std::is_same_v) diff --git a/engine/src/script/script.hpp b/engine/src/script/script.hpp index f2c3769..0ea182c 100644 --- a/engine/src/script/script.hpp +++ b/engine/src/script/script.hpp @@ -265,7 +265,7 @@ struct Script /// @param args The arguments to pass to the function. /// @return The optional integral return value. template - std::optional prepared_call(riscv::PreparedCall& pcall, Args&&... args); + std::optional prepared_call(riscv::PreparedCall& pcall, Args&&... args); // Create new Script instance from file Script( @@ -377,7 +377,7 @@ inline std::optional Script::call(const std::string& func, Arg } template -inline std::optional Script::prepared_call(riscv::PreparedCall& pcall, Args&&... args) +inline std::optional Script::prepared_call(riscv::PreparedCall& pcall, Args&&... args) { ScriptDepthMeter meter(this->m_call_depth); try diff --git a/ext/libriscv b/ext/libriscv index 47fa666..ec545fb 160000 --- a/ext/libriscv +++ b/ext/libriscv @@ -1 +1 @@ -Subproject commit 47fa666ce38eca10815f8d59b21859a6a5c1bb6b +Subproject commit ec545fbb505f089d953e72bded1249bebd3ad1b8 diff --git a/tests/Catch2 b/tests/Catch2 index e3fc97d..4e8d92b 160000 --- a/tests/Catch2 +++ b/tests/Catch2 @@ -1 +1 @@ -Subproject commit e3fc97dffbad63f49a90e5ae688b0ce0c282e8c2 +Subproject commit 4e8d92bf02f7d1c8006a0e7a5ecabd8e62d98502