From 90a2b0ac85b999f13dd7525227b17d811325fb27 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Tue, 6 Feb 2024 19:35:44 -0500 Subject: [PATCH 1/3] Call Ninja Directly --- dependencies/qemu/CMakeLists.txt | 10 +--------- dependencies/symbol-processor/src | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dependencies/qemu/CMakeLists.txt b/dependencies/qemu/CMakeLists.txt index 4ca7426..860bbe2 100644 --- a/dependencies/qemu/CMakeLists.txt +++ b/dependencies/qemu/CMakeLists.txt @@ -11,14 +11,6 @@ if(MCPI_IS_FLATPAK_BUILD) set(QEMU_PATCH "sed" "-i" "s/libdrm/libdrm-dis/g" "/meson.build") endif() -# Inherit Make Jobserver ()If Present) -include(ProcessorCount) -ProcessorCount(NPROC) -set(MAKE "make" "-j${NPROC}") -if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") - set(MAKE "$(MAKE)") -endif() - # Build include(ExternalProject) set(PKGCONFIG_ENV "") @@ -41,7 +33,7 @@ ExternalProject_Add(qemu "--target-list=arm-linux-user" "--without-default-features" USES_TERMINAL_CONFIGURE TRUE - BUILD_COMMAND ${MAKE} "qemu-arm" + BUILD_COMMAND ninja "qemu-arm" USES_TERMINAL_BUILD TRUE INSTALL_COMMAND "" TEST_COMMAND "" diff --git a/dependencies/symbol-processor/src b/dependencies/symbol-processor/src index fbdd1e2..8bca4b7 160000 --- a/dependencies/symbol-processor/src +++ b/dependencies/symbol-processor/src @@ -1 +1 @@ -Subproject commit fbdd1e27983eeb1329d51ee3264b2974c4901fbe +Subproject commit 8bca4b7ec6aa28ef6fbc894d1f358468bcc4b321 From 93498ce9c0dc4cd42411e9fdc896df2ffb9660f0 Mon Sep 17 00:00:00 2001 From: Bigjango13 Date: Tue, 30 Jan 2024 19:44:07 -0500 Subject: [PATCH 2/3] Fix load_symbol ignoring source when a previous source has already been loaded --- media-layer/core/src/audio/file.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/media-layer/core/src/audio/file.cpp b/media-layer/core/src/audio/file.cpp index 34de48c..0992548 100644 --- a/media-layer/core/src/audio/file.cpp +++ b/media-layer/core/src/audio/file.cpp @@ -13,10 +13,12 @@ // Load Symbol From ELF File static void load_symbol(const char *source, const char *name, std::function callback) { - static std::unique_ptr binary = NULL; - if (binary == NULL) { - binary = LIEF::ELF::Parser::parse(source); + static std::unordered_map> sources = {}; + auto pos = sources.find(std::string(source)); + if (pos == sources.end()) { + sources[std::string(source)] = LIEF::ELF::Parser::parse(source); } + std::unique_ptr &binary = sources[std::string(source)]; const LIEF::ELF::Symbol *symbol = binary->get_dynamic_symbol(name); if (symbol != NULL) { LIEF::span data = binary->get_content_from_virtual_address(symbol->value(), symbol->size(), LIEF::Binary::VA_TYPES::VA); From c62d5264a8d0a40da74a6ae67d4e608320ba3232 Mon Sep 17 00:00:00 2001 From: Bigjango13 Date: Tue, 6 Feb 2024 20:42:42 -0500 Subject: [PATCH 3/3] More consistent lookup for sounds --- media-layer/core/src/audio/file.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media-layer/core/src/audio/file.cpp b/media-layer/core/src/audio/file.cpp index 0992548..9cdb9ed 100644 --- a/media-layer/core/src/audio/file.cpp +++ b/media-layer/core/src/audio/file.cpp @@ -14,11 +14,11 @@ // Load Symbol From ELF File static void load_symbol(const char *source, const char *name, std::function callback) { static std::unordered_map> sources = {}; - auto pos = sources.find(std::string(source)); - if (pos == sources.end()) { - sources[std::string(source)] = LIEF::ELF::Parser::parse(source); + std::string cpp_source = source; + if (sources.count(cpp_source) == 0) { + sources[cpp_source] = LIEF::ELF::Parser::parse(source); } - std::unique_ptr &binary = sources[std::string(source)]; + std::unique_ptr &binary = sources[cpp_source]; const LIEF::ELF::Symbol *symbol = binary->get_dynamic_symbol(name); if (symbol != NULL) { LIEF::span data = binary->get_content_from_virtual_address(symbol->value(), symbol->size(), LIEF::Binary::VA_TYPES::VA);