Skip to content

Commit

Permalink
log : added release and debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
PoloNX committed May 25, 2024
1 parent 0b46365 commit b71009a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ int main(int argc, char* argv[]) {

std::filesystem::create_directories("sdmc:/config/SimpleModDownloader");

//std::cout << "test nxlink" << std::endl;
// Using FILE* because brls::Logger::setLogOutput only takes FILE*, not std::ofstream
//FILE* logFile = fopen("sdmc:/config/SimpleModDownloader/log.log", "w");
//brls::Logger::setLogOutput(logFile);
#ifdef NDEBUG //release
// Using FILE* because brls::Logger::setLogOutput only takes FILE*, not std::ofstream
FILE* logFile = fopen("sdmc:/config/SimpleModDownloader/log.log", "w");
brls::Logger::setLogOutput(logFile);
#endif


{
cfg::Config config;
Expand Down
2 changes: 1 addition & 1 deletion toolchain/devkitA64.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ toolchain("devkita64")
add_links(path.join(DEVKITPRO, "/portlibs/switch/lib/libcurl.a"))

on_load(function(toolchain)
toolchain:add("defines", "__SWITCH__", "SWITCH", "DEBUG", "DYG_ENABLE_EVENTS", "HAVE_LIBNX", "STBI_NO_THREAD_LOCALS", "BOREALIS_USE_DEKO3D")
toolchain:add("defines", "SWITCH", "HAVE_LIBNX", "STBI_NO_THREAD_LOCALS", "BOREALIS_USE_DEKO3D")
toolchain:add("arch", "-march=armv8-a+crc+crypto", "-mtune=cortex-a57", "-mtp=soft", "-fPIE")

toolchain:add("cflags", "-g", "-Wall", "-O2", "-ffunction-sections", "-fdata-sections", {force = true})
Expand Down

0 comments on commit b71009a

Please sign in to comment.