From f23f490cb4196bdaf826bdd25978a18346656d31 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 23 Mar 2022 10:39:20 -0700 Subject: [PATCH] strat: fix clang build --- libraries/config/templates/stratosphere.mk | 2 ++ .../libstratosphere/source/ncm/ncm_extended_data_mapper.hpp | 1 + libraries/libstratosphere/source/pm/pm_shell_api.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/config/templates/stratosphere.mk b/libraries/config/templates/stratosphere.mk index 4b05a1928..593258b40 100644 --- a/libraries/config/templates/stratosphere.mk +++ b/libraries/config/templates/stratosphere.mk @@ -67,6 +67,8 @@ endif ifeq ($(ATMOSPHERE_BOARD),nx-hac-001) export LDFLAGS = -specs=$(ATMOSPHERE_LIBRARIES_DIR)/libstratosphere/stratosphere.specs -specs=$(DEVKITPRO)/libnx/switch.specs $(CXXFLAGS) $(CXXWRAPS) $(CXXREQUIRED) -Wl,-Map,$(notdir $*.map) +else ifeq ($(ATMOSPHERE_COMPILER_NAME),clang) +export LDFLAGS = $(CXXFLAGS) $(CXXWRAPS) $(CXXREQUIRED) -Wl,-map,$(notdir $@.map) else export LDFLAGS = $(CXXFLAGS) $(CXXWRAPS) $(CXXREQUIRED) -Wl,-Map,$(notdir $@.map) endif diff --git a/libraries/libstratosphere/source/ncm/ncm_extended_data_mapper.hpp b/libraries/libstratosphere/source/ncm/ncm_extended_data_mapper.hpp index 97e248a90..6efe6795c 100644 --- a/libraries/libstratosphere/source/ncm/ncm_extended_data_mapper.hpp +++ b/libraries/libstratosphere/source/ncm/ncm_extended_data_mapper.hpp @@ -69,6 +69,7 @@ namespace ams::ncm { /* Set as dirty/not mapped. */ m_is_dirty = false; m_is_mapped = false; + R_SUCCEED(); } Result GetMappedMemoryImpl(MappedMemory *out, size_t offset, size_t size) { diff --git a/libraries/libstratosphere/source/pm/pm_shell_api.cpp b/libraries/libstratosphere/source/pm/pm_shell_api.cpp index 8feaf95bc..346013efb 100644 --- a/libraries/libstratosphere/source/pm/pm_shell_api.cpp +++ b/libraries/libstratosphere/source/pm/pm_shell_api.cpp @@ -53,10 +53,10 @@ namespace ams::pm::shell { Result BoostApplicationThreadResourceLimit() { return ::pmshellBoostApplicationThreadResourceLimit(); } - #endif Result BoostSystemThreadResourceLimit() { return ::pmshellBoostSystemThreadResourceLimit(); } + #endif }