diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 59e0c388af3..58af9eafd0b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -63,7 +63,7 @@ jobs: mv ${{ matrix.bookworm-type }} bookworm-toolchain - name: Shim toolchain dir (non-bookworm) if: (!startsWith(matrix.artifact-name, 'Bookworm')) - run: mkdir bookworm-toolchain + run: mkdir /work/bookworm-toolchain - name: Test toolchain if: startsWith(matrix.artifact-name, 'Bookworm') run: bookworm-toolchain/bin/${{ matrix.bookworm-prefix }}g++ -v diff --git a/build.gradle b/build.gradle index 013c2e2a82b..34deea385ee 100644 --- a/build.gradle +++ b/build.gradle @@ -27,6 +27,49 @@ plugins { id 'com.google.protobuf' version '0.9.3' apply false } +nativeUtils.addWpiNativeUtils() +if(project.hasProperty("bookworm")) { + toolchainsPlugin.crossCompilers { + bookworm-linuxarm64 { + architecture = "arm" + compilerPrefix = "aarch64-bookworm-linux-gnu-" + operatingSystem = "linux" + optional = false + } + } + nativeUtils.platformConfigs { + bookworm-linuxarm64 { + platformPath = "linux/bookworm-arm64" + cppCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCompilerArgs); + cCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCCompilerArgs); + linker.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossLinkerArgs); + cppCompiler.debugArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossDebugCompilerArgs); + cppCompiler.releaseArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossReleaseCompilerArgs); + } + } +} + +if(project.hasProperty("raspi-bookworm")) { + toolchainsPlugin.crossCompilers { + bookworm-linuxarm32 { + architecture = "arm" + compilerPrefix = "armv6-bookworm-linux-gnueabihf-" + operatingSystem = "linux" + optional = false + } + } + nativeUtils.platformConfigs { + bookworm-linuxarm32 { + platformPath = "linux/bookworm-arm32" + cppCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCompilerArgs); + cCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCCompilerArgs); + linker.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossLinkerArgs); + cppCompiler.debugArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossDebugCompilerArgs); + cppCompiler.releaseArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossReleaseCompilerArgs); + } + } +} + wpilibVersioning.buildServerMode = project.hasProperty('buildServer') wpilibVersioning.releaseMode = project.hasProperty('releaseMode') diff --git a/shared/config.gradle b/shared/config.gradle index 57347500b37..6c4f3942b42 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -22,50 +22,6 @@ nativeUtils { } } -if(project.hasProperty("bookworm")) { - toolchainsPlugin.crossCompilers { - bookworm-linuxarm64 { - architecture = "arm" - compilerPrefix = "aarch64-bookworm-linux-gnu-" - operatingSystem = "linux" - optional = false - } - } - nativeUtils.platformConfigs { - bookworm-linuxarm64 { - platformPath = "linux/bookworm-arm64" - cppCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCompilerArgs); - cCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCCompilerArgs); - linker.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossLinkerArgs); - cppCompiler.debugArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossDebugCompilerArgs); - cppCompiler.releaseArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossReleaseCompilerArgs); - } - } -} - -if(project.hasProperty("raspi-bookworm")) { - toolchainsPlugin.crossCompilers { - bookworm-linuxarm32 { - architecture = "arm" - compilerPrefix = "armv6-bookworm-linux-gnueabihf-" - operatingSystem = "linux" - optional = false - } - } - nativeUtils.platformConfigs { - bookworm-linuxarm32 { - platformPath = "linux/bookworm-arm32" - cppCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCompilerArgs); - cCompiler.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossCCompilerArgs); - linker.args.addAll(nativeUtils.wpi.defaultArguments.linuxCrossLinkerArgs); - cppCompiler.debugArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossDebugCompilerArgs); - cppCompiler.releaseArgs.addAll(nativeUtils.wpi.defaultArguments.linuxCrossReleaseCompilerArgs); - } - } -} - - - nativeUtils.wpi.addWarnings() nativeUtils.wpi.addWarningsAsErrors()