From fcde887f2191d081276ae6f49776704717e91f31 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 14 Nov 2020 14:14:07 -0800 Subject: [PATCH] exo/program: release, debug, audit configs --- libexosphere/arm.mk | 6 +++--- libexosphere/arm64.mk | 6 +++--- libexosphere/source/log/log_api.cpp | 2 +- libvapours/include/vapours/common.hpp | 14 +++++++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/libexosphere/arm.mk b/libexosphere/arm.mk index f6acfd8d..3b3abcd8 100644 --- a/libexosphere/arm.mk +++ b/libexosphere/arm.mk @@ -96,15 +96,15 @@ clean-$(strip $1): endef $(eval $(call ATMOSPHERE_ADD_TARGET, release, $(TARGET).a, \ - ATMOSPHERE_BUILD_SETTINGS="" \ + ATMOSPHERE_BUILD_SETTINGS="-DAMS_FORCE_DISABLE_DETAILED_ASSERTIONS " \ )) $(eval $(call ATMOSPHERE_ADD_TARGET, debug, $(TARGET)_debug.a, \ - ATMOSPHERE_BUILD_SETTINGS="-DAMS_BUILD_FOR_DEBUGGING" \ + ATMOSPHERE_BUILD_SETTINGS="-DAMS_FORCE_DISABLE_DETAILED_ASSERTIONS -DAMS_BUILD_FOR_DEBUGGING" \ )) $(eval $(call ATMOSPHERE_ADD_TARGET, audit, $(TARGET)_audit.a, \ - ATMOSPHERE_BUILD_SETTINGS="-DAMS_BUILD_FOR_AUDITING" \ + ATMOSPHERE_BUILD_SETTINGS="-DAMS_FORCE_DISABLE_DETAILED_ASSERTIONS -DAMS_BUILD_FOR_AUDITING" \ )) #--------------------------------------------------------------------------------- diff --git a/libexosphere/arm64.mk b/libexosphere/arm64.mk index f5911130..624a28bb 100644 --- a/libexosphere/arm64.mk +++ b/libexosphere/arm64.mk @@ -96,15 +96,15 @@ clean-$(strip $1): endef $(eval $(call ATMOSPHERE_ADD_TARGET, release, $(TARGET).a, \ - ATMOSPHERE_BUILD_SETTINGS="" \ + ATMOSPHERE_BUILD_SETTINGS="-DAMS_FORCE_DISABLE_DETAILED_ASSERTIONS " \ )) $(eval $(call ATMOSPHERE_ADD_TARGET, debug, $(TARGET)_debug.a, \ - ATMOSPHERE_BUILD_SETTINGS="-DAMS_BUILD_FOR_DEBUGGING" \ + ATMOSPHERE_BUILD_SETTINGS="-DAMS_FORCE_DISABLE_DETAILED_ASSERTIONS -DAMS_BUILD_FOR_DEBUGGING" \ )) $(eval $(call ATMOSPHERE_ADD_TARGET, audit, $(TARGET)_audit.a, \ - ATMOSPHERE_BUILD_SETTINGS="-DAMS_BUILD_FOR_AUDITING" \ + ATMOSPHERE_BUILD_SETTINGS="-DAMS_FORCE_DISABLE_DETAILED_ASSERTIONS -DAMS_BUILD_FOR_AUDITING" \ )) #--------------------------------------------------------------------------------- diff --git a/libexosphere/source/log/log_api.cpp b/libexosphere/source/log/log_api.cpp index 93ce0d7c..068dddc2 100644 --- a/libexosphere/source/log/log_api.cpp +++ b/libexosphere/source/log/log_api.cpp @@ -68,7 +68,7 @@ namespace ams::log { SetupUart(); /* Initialize the target uart port. */ - uart::Initialize(UartLogPort, 115200, UartPortFlags); + uart::Initialize(UartLogPort, UartBaudRate, UartPortFlags); /* Note that we've initialized. */ g_initialized_uart = true; diff --git a/libvapours/include/vapours/common.hpp b/libvapours/include/vapours/common.hpp index 15060a03..b037b31d 100644 --- a/libvapours/include/vapours/common.hpp +++ b/libvapours/include/vapours/common.hpp @@ -17,19 +17,23 @@ #include #include +#if defined(AMS_FORCE_DISABLE_DETAILED_ASSERTIONS) && defined(AMS_FORCE_ENABLE_DETAILED_ASSERTIONS) + #error "Invalid detailed assertions state" +#endif + #ifdef AMS_BUILD_FOR_AUDITING -#define AMS_BUILD_FOR_DEBUGGING + #define AMS_BUILD_FOR_DEBUGGING -#if !defined(AMS_FORCE_DISABLE_DETAILED_ASSERTIONS) - #define AMS_ENABLE_DETAILED_ASSERTIONS -#endif + #if !defined(AMS_FORCE_DISABLE_DETAILED_ASSERTIONS) + #define AMS_ENABLE_DETAILED_ASSERTIONS + #endif #endif #ifdef AMS_BUILD_FOR_DEBUGGING -#define AMS_ENABLE_ASSERTIONS + #define AMS_ENABLE_ASSERTIONS #if !defined(AMS_ENABLE_DETAILED_ASSERTIONS) && !defined(AMS_FORCE_DISABLE_DETAILED_ASSERTIONS)