From 4874be967c0286fafa398fa6f018126ecb2cc48d Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Tue, 19 Jun 2018 16:58:09 +0900 Subject: [PATCH] Add config section for Nintendo Switch --- config/nim.cfg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/nim.cfg b/config/nim.cfg index e11826587..5342676de 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -109,6 +109,14 @@ path="$lib/pure" @end @end +@if nintendoswitch: + cc = "switch_gcc" + switch_gcc.options.linker = "-specs=$DEVKITPRO/libnx/switch.specs -g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -L$DEVKITPRO/portlibs/switch/lib -L$DEVKITPRO/libnx/lib -lnx $SWITCH_LIBS" + switch_gcc.cpp.options.linker = "-specs=$DEVKITPRO/libnx/switch.specs -g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -L$DEVKITPRO/portlibs/switch/lib -L$DEVKITPRO/libnx/lib -lnx $SWITCH_LIBS" + switch_gcc.options.always = "-g -Wall -O2 -ffunction-sections -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -I$DEVKITPRO/portlibs/switch/include -I$DEVKITPRO/libnx/include $SWITCH_INCLUDES -D__SWITCH__" + switch_gcc.cpp.options.always = "-g -Wall -O2 -ffunction-sections -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -I$DEVKITPRO/portlibs/switch/include -I$DEVKITPRO/libnx/include $SWITCH_INCLUDES -D__SWITCH__ -fno-rtti -fno-exceptions -std=gnu++11" +@end + # Configuration for the Intel C/C++ compiler: @if windows: icl.options.speed = "/Ox /arch:SSE2"