mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Create dummy wpiutil library. (#84)
This will allow dependencies such as wpilibc to update to use wpiutil without breaking "normal" ntcore static library use in the meantime. This commit also restructures the gradle files by creating a new (placeholder) wpiutil project, and moving the ntcore project into a separate gradle file. Added toolchains/native.gradle (refactored from ntcore). Also fixes ntcore skipJava on Windows by providing an alternate .def file for this case.
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
ext.isArm = true
|
||||
ext.buildPlatform = 'arm'
|
||||
|
||||
def compilerPrefix = project.hasProperty('compilerPrefix') ? project.compilerPrefix : 'arm-frc-linux-gnueabi-'
|
||||
model {
|
||||
platforms {
|
||||
arm {
|
||||
architecture 'arm'
|
||||
operatingSystem 'linux'
|
||||
}
|
||||
}
|
||||
toolChains {
|
||||
gcc(Gcc) {
|
||||
target("arm") {
|
||||
@@ -65,6 +74,9 @@ ext.setupDebugDefines = { cppCompiler, linker ->
|
||||
cppCompiler.args '-g', '-O0'
|
||||
}
|
||||
|
||||
// Used only on Windows.
|
||||
ext.setupDef = { linker, deffile -> }
|
||||
|
||||
ext.releaseSetup = { releaseTasks ->
|
||||
model {
|
||||
binaries {
|
||||
|
||||
@@ -41,6 +41,9 @@ ext.setupDebugDefines = { cppCompiler, linker ->
|
||||
cppCompiler.args '-g', '-O0'
|
||||
}
|
||||
|
||||
// Used only on Windows.
|
||||
ext.setupDef = { linker, deffile -> }
|
||||
|
||||
ext.releaseSetup = { releaseTasks ->
|
||||
model {
|
||||
binaries {
|
||||
|
||||
@@ -30,6 +30,9 @@ ext.setupDebugDefines = { cppCompiler, linker ->
|
||||
cppCompiler.args '-g', '-O0'
|
||||
}
|
||||
|
||||
// Used only on Windows.
|
||||
ext.setupDef = { linker, deffile -> }
|
||||
|
||||
ext.releaseSetup = { releaseTasks ->
|
||||
model {
|
||||
binaries {
|
||||
|
||||
25
toolchains/native.gradle
Normal file
25
toolchains/native.gradle
Normal file
@@ -0,0 +1,25 @@
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
ext.isArm = false
|
||||
ext.buildPlatform = OperatingSystem.current().getFamilyName()
|
||||
|
||||
if (OperatingSystem.current().isLinux()) {
|
||||
apply from: "${rootDir}/toolchains/linux.gradle"
|
||||
} else if (OperatingSystem.current().isMacOsX()) {
|
||||
apply from: "${rootDir}/toolchains/mac.gradle"
|
||||
} else if (OperatingSystem.current().isWindows()) {
|
||||
apply from: "${rootDir}/toolchains/windows.gradle"
|
||||
} else {
|
||||
throw new GradleException("${name} does not support building on ${ext.buildPlatform}.")
|
||||
}
|
||||
|
||||
model {
|
||||
platforms {
|
||||
x86 {
|
||||
architecture 'x86'
|
||||
}
|
||||
x64 {
|
||||
architecture 'x86_64'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,14 +36,17 @@ model {
|
||||
|
||||
ext.setupReleaseDefines = { cppCompiler, linker ->
|
||||
cppCompiler.args '/O2', '/Zi', '/FS'
|
||||
linker.args '/DEF:../ntcore.def'
|
||||
}
|
||||
|
||||
ext.setupDebugDefines = { cppCompiler, linker ->
|
||||
cppCompiler.args '/Zi', '/FS'
|
||||
linker.args '/DEBUG', '/DEF:../ntcore.def'
|
||||
linker.args '/DEBUG'
|
||||
}
|
||||
|
||||
ext.setupDef = { linker, deffile ->
|
||||
linker.args "/DEF:${deffile}"
|
||||
}
|
||||
|
||||
// This is a noop on Windows. On gcc platforms, we strip the release binary and create a separate
|
||||
// debug library, but Windows already separates debug symbols into a .pdb file.
|
||||
ext.releaseSetup = {}
|
||||
ext.releaseSetup = { releaseTasks -> }
|
||||
|
||||
Reference in New Issue
Block a user