mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Removes specific raspbian, armv7 and armv8 cross builds (#41)
Will make the cross platform build case easier. A bit more difficult to consume, but will be easier in the long run.
This commit is contained in:
committed by
Peter Johnson
parent
9e8ad778dd
commit
a6c7789b5e
@@ -175,34 +175,17 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
compilerFamily = 'Clang'
|
||||
detectPlatform = mac64PlatformDetect
|
||||
}
|
||||
raspbian(CrossBuildConfig) {
|
||||
architecture = 'raspbian'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty('linuxCross')) {
|
||||
model {
|
||||
buildConfigs {
|
||||
linuxArm(CrossBuildConfig) {
|
||||
architecture = 'nativearm'
|
||||
operatingSystem = 'linux'
|
||||
toolChainPrefix = 'arm-linux-gnueabihf-'
|
||||
compilerArgs = linuxCompilerArgs
|
||||
linkerArgs = linuxLinkerArgs
|
||||
debugCompilerArgs = linuxDebugCompilerArgs
|
||||
releaseCompilerArgs = linuxReleaseCompilerArgs
|
||||
skipByDefault = true
|
||||
compilerFamily = 'Gcc'
|
||||
exclude << 'gmock'
|
||||
}
|
||||
armhf(CrossBuildConfig) {
|
||||
architecture = 'armhf'
|
||||
operatingSystem = 'linux'
|
||||
toolChainPrefix = 'arm-linux-gnueabihf-'
|
||||
compilerArgs = linuxCompilerArgs
|
||||
linkerArgs = linuxLinkerArgs
|
||||
debugCompilerArgs = linuxDebugCompilerArgs
|
||||
releaseCompilerArgs = linuxReleaseCompilerArgs
|
||||
skipByDefault = true
|
||||
compilerFamily = 'Gcc'
|
||||
exclude << 'gmock'
|
||||
}
|
||||
aarch(CrossBuildConfig) {
|
||||
architecture = 'aarch'
|
||||
operatingSystem = 'linux'
|
||||
toolChainPrefix = 'aarch-linux-gnu-'
|
||||
toolChainPrefix = 'PLEASE_PROVIDE_A_COMPILER_NAME'
|
||||
compilerArgs = linuxCompilerArgs
|
||||
linkerArgs = linuxLinkerArgs
|
||||
debugCompilerArgs = linuxDebugCompilerArgs
|
||||
@@ -211,6 +194,11 @@ if (!project.hasProperty('onlyAthena')) {
|
||||
compilerFamily = 'Gcc'
|
||||
exclude << 'gmock'
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
model {
|
||||
buildConfigs {
|
||||
linuxArm(BuildConfig) {
|
||||
architecture = 'nativearm'
|
||||
operatingSystem = 'linux'
|
||||
|
||||
@@ -44,14 +44,8 @@ public class RuntimeDetector {
|
||||
filePath = "/linux/x86-64/";
|
||||
} else if (isAthena()) {
|
||||
filePath = "/linux/athena/";
|
||||
} else if (isRaspbian()) {
|
||||
filePath = "/linux/raspbian/";
|
||||
} else if (isArmV7()) {
|
||||
filePath = "/linux/armhf/";
|
||||
} else if (isAarch64()) {
|
||||
filePath = "/linux/aarch/";
|
||||
} else {
|
||||
filePath = "/linux/arm/";
|
||||
filePath = "/linux/nativearm/";
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("Failed to determine OS");
|
||||
@@ -87,32 +81,6 @@ public class RuntimeDetector {
|
||||
return runRobotFile.exists();
|
||||
}
|
||||
|
||||
public static boolean isRaspbian() {
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec("uname -a");
|
||||
BufferedReader in = new BufferedReader(
|
||||
new InputStreamReader(p.getInputStream()));
|
||||
return in.readLine().contains("raspberrypi");
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isArmV7() {
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec("uname -a");
|
||||
BufferedReader in = new BufferedReader(
|
||||
new InputStreamReader(p.getInputStream()));
|
||||
return in.readLine().contains("armv7");
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isAarch64() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isLinux() {
|
||||
return System.getProperty("os.name").startsWith("Linux");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user