changes for M1

This commit is contained in:
Tom Nelson 2021-01-15 17:38:50 +00:00 committed by ghidra1
parent 92b2405c53
commit 31b3db431e
3 changed files with 19 additions and 0 deletions

View File

@ -546,6 +546,7 @@ model {
}
}
else if (b.toolChain in Clang) {
b.cppCompiler.args "-std=c++11"
b.cppCompiler.args "-Wall"
b.cppCompiler.args "-O2" // for DEBUG, comment this line out
// b.cppCompiler.args "-g" // for DEBUG, uncomment this line

View File

@ -181,6 +181,20 @@ typedef char int1;
typedef uint8 uintp;
#endif
#if defined (__APPLE_CC__) && defined (__aarch64__)
#define HOST_ENDIAN 0
typedef unsigned int uintm;
typedef int intm;
typedef unsigned long uint8;
typedef long int8;
typedef unsigned int uint4;
typedef int int4;
typedef unsigned short uint2;
typedef short int2;
typedef unsigned char uint1;
typedef char int1;
typedef uint8 uintp;
#endif
#if defined(_WINDOWS)
#pragma warning (disable:4312)

View File

@ -265,6 +265,7 @@ String getCurrentPlatformName() {
boolean isX86_32 = archName.equals("x86") || archName.equals("i386");
boolean isX86_64 = archName.equals("x86_64") || archName.equals("amd64");
boolean isAARCH_64 = archName.equals("aarch64");
if (osName.startsWith("Windows")) {
if (isX86_32) {
@ -283,6 +284,9 @@ String getCurrentPlatformName() {
if (isX86_64) {
return 'osx64'
}
if (isAARCH_64) {
return 'aarch64'
}
}
throw new GradleException("Unrecognized current platform -> osName = $osName, archName = $archName")
}