Skip to content

Commit 0f08f88

Browse files
committed
Allow C++ compilation if '-allowcpp' is given.
1 parent bc687fb commit 0f08f88

File tree

1 file changed

+5
-1
lines changed
  • graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class GraalPythonCC extends GraalPythonCompiler {
6161
private List<String> execLinkArgs;
6262
private List<String> fileInputs;
6363
private boolean isCpp;
64+
private boolean allowCpp;
6465

6566
GraalPythonCC() {
6667
}
@@ -104,7 +105,7 @@ static void main(String[] args) {
104105

105106
private void run(String[] args) {
106107
parseOptions(args);
107-
if (isCpp) {
108+
if (!allowCpp && isCpp) {
108109
// cannot use streaming API anyMatch for this on SVM
109110
for (String s : clangArgs) {
110111
if (s.contains("--sysroot")) {
@@ -159,6 +160,9 @@ private void parseOptions(String[] args) {
159160
continue; // the first verbose is not passed on to clang
160161
}
161162
break;
163+
case "-allowcpp":
164+
allowCpp = true;
165+
continue;
162166
default:
163167
if (arg.endsWith(".o") || arg.endsWith(".bc")) {
164168
if (compile == null) {

0 commit comments

Comments
 (0)