Skip to content

Commit 3a25348

Browse files
committed
Add a custom systemcore define
1 parent ab016ae commit 3a25348

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public static class DefaultArguments {
7878
public final List<String> linuxReleaseCompilerArgs = List.of("-O2");
7979
public final List<String> linuxDebugCompilerArgs = List.of("-O0");
8080

81+
public final List<String> linuxSystemCoreArgs = List.of("-D__FRC_SYSTEMCORE__=1");
82+
8183
public final String macMinimumVersionArg = "-mmacosx-version-min=13.3";
8284

8385
public final List<String> macCompilerArgs = List.of("-std=c++20", "-pedantic", "-fPIC", "-Wno-unused-parameter",
@@ -232,6 +234,10 @@ public WPINativeUtilsExtension(NativeUtilsExtension nativeExt, Project project)
232234

233235
linuxsystemcore.getPlatformPath().set("linux/systemcore");
234236
addLinuxCrossArgs(linuxsystemcore);
237+
linuxsystemcore.getCppCompiler().getArgs().addAll(defaultArguments.linuxSystemCoreArgs);
238+
linuxsystemcore.getcCompiler().getArgs().addAll(defaultArguments.linuxSystemCoreArgs);
239+
linuxsystemcore.getObjcCompiler().getArgs().addAll(defaultArguments.linuxSystemCoreArgs);
240+
linuxsystemcore.getObjcppCompiler().getArgs().addAll(defaultArguments.linuxSystemCoreArgs);
235241

236242
linuxarm32.getPlatformPath().set("linux/arm32");
237243
addLinuxCrossArgs(linuxarm32);

0 commit comments

Comments
 (0)