Skip to content

Commit 512925a

Browse files
committed
IDE warns if a library is compiled with an unsupported architecture
1 parent 164da52 commit 512925a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/src/processing/app/debug/Compiler.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ public boolean compile(boolean _verbose) throws RunnerException {
101101
}
102102
if (verbose)
103103
System.out.println();
104+
105+
String arch = Base.getTargetPlatform().getId();
106+
for (Library lib : sketch.getImportedLibraries()) {
107+
if (!lib.supportsArchitecture(arch)) {
108+
System.err.println(I18n
109+
.format(_("WARNING: library {0} claims to run on {1} "
110+
+ "architecture(s) and may be incompatible with your"
111+
+ " current board which runs on [{2}] architecture."), lib
112+
.getName(), lib.getArchitectures(), arch));
113+
System.err.println();
114+
}
115+
}
104116

105117
// 1. compile the sketch (already in the buildPath)
106118
sketch.setCompilingProgress(30);

0 commit comments

Comments
 (0)