improvements to build script

This commit is contained in:
shibbo 2020-07-23 22:37:15 -04:00
parent 19bb23b242
commit 7d195d3571
2 changed files with 7 additions and 8 deletions

View file

@ -9,10 +9,12 @@ sdkRoot = os.getenv('SDK_ROOT')
if sdkRoot == None:
error("Error: SDK_ROOT not set.")
compilerPath = f"{sdkRoot}/Compilers/NX/nx/aarch64/bin/clang++.exe"
includePath = f"{sdkRoot}/Include"
libraryPath = f"{sdkRoot}/Libraries/NX-NXFP2-a64/Release"
releasePath = f"{sdkRoot}/Common/Configs/Targets/NX-NXFP2-a64/Include"
root = pathlib.Path(sdkRoot)
compilerPath = root / "Compilers/NX/nx/aarch64/bin/clang++.exe"
includePath = root / "Include"
libraryPath = root / "Libraries/NX-NXFP2-a64/Release"
releasePath = root / "Common/Configs/Targets/NX-NXFP2-a64/Include"
compilerCommand = f"{compilerPath} -x c++ -std=gnu++14 -fno-common -fno-short-enums -ffunction-sections -fdata-sections -fPIC -Wall -O3 -fomit-frame-pointer -mcpu=cortex-a57+fp+simd+crypto+crc -g -DNN_NINTENDO_SDK -DNN_SDK_BUILD_RELEASE -I include -I {includePath} -I {releasePath} -c "
@ -23,7 +25,6 @@ numFiles = 0
for cpp_file in cpp_files:
compilerCommand += str(cpp_file) + " "
numFiles += 1
if subprocess.call(compilerCommand) == 1:
sys.exit(1)

View file

@ -2,7 +2,5 @@
int doStuff()
{
nn::os::AllocateMemoryBlock(nullptr, 0x100);
int i = 0;
return i;
return 0;
}