Skip to content

Commit a7db452

Browse files
committed
avoid stream API for SVM
1 parent 06fd738 commit a7db452

File tree

1 file changed

+12
-7
lines changed
  • graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell

1 file changed

+12
-7
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonCC.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,19 @@ static void main(String[] args) {
104104

105105
private void run(String[] args) {
106106
parseOptions(args);
107-
if (isCpp && clangArgs.stream().anyMatch(s -> s.contains("--sysroot"))) {
108-
// nasty, nasty
109-
logV("Refusing to compile C++ code in sandboxed mode, because we cannot actually do it");
110-
try {
111-
Files.createFile(Paths.get(outputFilename));
112-
} catch (IOException e) {
107+
if (isCpp) {
108+
// cannot use streaming API anyMatch for this on SVM
109+
for (String s : clangArgs) {
110+
if (s.contains("--sysroot")) {
111+
// nasty, nasty
112+
logV("Refusing to compile C++ code in sandboxed mode, because we cannot actually do it");
113+
try {
114+
Files.createFile(Paths.get(outputFilename));
115+
} catch (IOException e) {
116+
}
117+
return;
118+
}
113119
}
114-
return;
115120
}
116121
launchCC();
117122
}

0 commit comments

Comments
 (0)