GP-1106: Platform naming convention now supports different

architectures. Support for building on ARM.
This commit is contained in:
Ryan Kurtz 2021-07-07 09:25:39 -04:00
parent b55d1049d4
commit 00533b2869
43 changed files with 523 additions and 461 deletions

View file

@ -34,77 +34,70 @@ dependencies {
// Ensure the below native test binaries don't get built for a distribution
ext.nativesTestOnly = true
task testSpecimenWin64 {
dependsOn 'expCreateProcessWin64Executable'
dependsOn 'expCreateThreadExitWin64Executable'
//dependsOn 'expCreateThreadSpinWin64Executable'
dependsOn 'expPrintWin64Executable'
//dependsOn 'expSpinWin64Executable'
dependsOn 'expRegistersWin64Executable'
dependsOn 'expStackWin64Executable'
task testSpecimenWin_x86_64 {
dependsOn 'expCreateProcessWin_x86_64Executable'
dependsOn 'expCreateThreadExitWin_x86_64Executable'
//dependsOn 'expCreateThreadSpinWin_x86_64Executable'
dependsOn 'expPrintWin_x86_64Executable'
//dependsOn 'expSpinWin_x86_64Executable'
dependsOn 'expRegistersWin_x86_64Executable'
dependsOn 'expStackWin_x86_64Executable'
}
task testSpecimenLinux64 {
dependsOn 'expCloneExecExecutable'//Linux64Executable'
dependsOn 'expCloneExitExecutable'//Linux64Executable'
//dependsOn 'expCloneSpinExecutable'//Linux64Executable'
dependsOn 'expForkExecutable'//Linux64Executable'
dependsOn 'expPrintLinux64Executable'
//dependsOn 'expTypesExecutable'//Linux64Executable'
dependsOn 'expRegistersLinux64Executable'
dependsOn 'expStackLinux64Executable'
task testSpecimenLinux_x86_64 {
dependsOn 'expCloneExecExecutable'//Linux_x86_64Executable'
dependsOn 'expCloneExitExecutable'//Linux_x86_64Executable'
//dependsOn 'expCloneSpinExecutable'//Linux_x86_64Executable'
dependsOn 'expForkExecutable'//Linux_x86_64Executable'
dependsOn 'expPrintLinux_x86_64Executable'
//dependsOn 'expTypesExecutable'//Linux_x86_64Executable'
dependsOn 'expRegistersLinux_x86_64Executable'
dependsOn 'expStackLinux_x86_64Executable'
}
model {
platforms {
/*linux32 {
architecture "x86"
operatingSystem "linux"
}*/
}
components {
expCreateProcess(NativeExecutableSpec) {
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
expCreateThreadExit(NativeExecutableSpec) {
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
expCreateThreadSpin(NativeExecutableSpec) {
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
expCloneExec(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
}
expCloneExit(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
}
expCloneSpin(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
}
expFork(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
}
expPrint(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
expSpin(NativeExecutableSpec) {
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
expTypes(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
binaries {
withType(NativeExecutableBinarySpec) {
if (toolChain in Gcc) {
@ -114,16 +107,16 @@ model {
}
}
expRegisters(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
expStack(NativeExecutableSpec) {
targetPlatform "linux64"
//targetPlatform "linux32" // TODO: Test on these
targetPlatform "win64"
targetPlatform "win32" // TODO: Test on these
targetPlatform "linux_x86_64"
//targetPlatform "linux_x86_32" // TODO: Test on these
targetPlatform "win_x86_64"
targetPlatform "win_x86_32" // TODO: Test on these
}
}
@ -141,7 +134,7 @@ model {
linker.args("/SUBSYSTEM:windows", "/DYNAMICBASE", "/NXCOMPAT")
linker.args("shell32.lib");
}
if (targetPlatform.name.startsWith("win")) {
if (isWindows(targetPlatform.name)) {
cppCompiler.define("WIN32")
cCompiler.define("WIN32")