|
|
@ -52,7 +52,7 @@ public class InferRunner {
|
|
|
|
"/dependencies/java/jackson/jackson-2.2.3.jar",
|
|
|
|
"/dependencies/java/jackson/jackson-2.2.3.jar",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
private static final String IOS_ISYSROOT_SUFFIX =
|
|
|
|
private static final String IPHONESIMULATOR_ISYSROOT_SUFFIX =
|
|
|
|
"/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
|
|
|
|
"/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
|
|
|
|
|
|
|
|
|
|
|
|
private static HashMap<String, InferResults> inferResultsMap =
|
|
|
|
private static HashMap<String, InferResults> inferResultsMap =
|
|
|
@ -200,6 +200,7 @@ public class InferRunner {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ImmutableList<String> clangCmd = new ImmutableList.Builder<String>()
|
|
|
|
ImmutableList<String> clangCmd = new ImmutableList.Builder<String>()
|
|
|
|
.add("clang")
|
|
|
|
.add("clang")
|
|
|
|
|
|
|
|
.add("--target=x86_64-apple-darwin14")
|
|
|
|
.add("-x")
|
|
|
|
.add("-x")
|
|
|
|
.add(getClangLangOption(lang))
|
|
|
|
.add(getClangLangOption(lang))
|
|
|
|
.add(getStdParam(lang))
|
|
|
|
.add(getStdParam(lang))
|
|
|
@ -279,39 +280,39 @@ public class InferRunner {
|
|
|
|
|
|
|
|
|
|
|
|
public static ImmutableList<String> createObjCInferCommandFrontend(
|
|
|
|
public static ImmutableList<String> createObjCInferCommandFrontend(
|
|
|
|
TemporaryFolder folder,
|
|
|
|
TemporaryFolder folder,
|
|
|
|
String sourceFile) {
|
|
|
|
String sourceFile) throws IOException, InterruptedException {
|
|
|
|
return createClangInferCommand(
|
|
|
|
return createClangInferCommand(
|
|
|
|
folder,
|
|
|
|
folder,
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
null,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ImmutableList<String> createObjCInferCommandFrontendArc(
|
|
|
|
public static ImmutableList<String> createObjCInferCommandFrontendArc(
|
|
|
|
TemporaryFolder folder,
|
|
|
|
TemporaryFolder folder,
|
|
|
|
String sourceFile) {
|
|
|
|
String sourceFile) throws IOException, InterruptedException {
|
|
|
|
return createClangInferCommand(
|
|
|
|
return createClangInferCommand(
|
|
|
|
folder,
|
|
|
|
folder,
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
null,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
true);
|
|
|
|
true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ImmutableList<String> createObjCPPInferCommandFrontend(
|
|
|
|
public static ImmutableList<String> createObjCPPInferCommandFrontend(
|
|
|
|
TemporaryFolder folder,
|
|
|
|
TemporaryFolder folder,
|
|
|
|
String sourceFile) {
|
|
|
|
String sourceFile) throws IOException, InterruptedException {
|
|
|
|
return createClangInferCommand(
|
|
|
|
return createClangInferCommand(
|
|
|
|
folder,
|
|
|
|
folder,
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjCPP,
|
|
|
|
Language.ObjCPP,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
null,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -344,13 +345,13 @@ public class InferRunner {
|
|
|
|
|
|
|
|
|
|
|
|
public static ImmutableList<String> createObjCInferCommand(
|
|
|
|
public static ImmutableList<String> createObjCInferCommand(
|
|
|
|
TemporaryFolder folder,
|
|
|
|
TemporaryFolder folder,
|
|
|
|
String sourceFile) {
|
|
|
|
String sourceFile) throws IOException, InterruptedException {
|
|
|
|
return createClangInferCommand(
|
|
|
|
return createClangInferCommand(
|
|
|
|
folder,
|
|
|
|
folder,
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
null,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -359,26 +360,26 @@ public class InferRunner {
|
|
|
|
TemporaryFolder folder,
|
|
|
|
TemporaryFolder folder,
|
|
|
|
String sourceFile,
|
|
|
|
String sourceFile,
|
|
|
|
String ml_bucket,
|
|
|
|
String ml_bucket,
|
|
|
|
boolean arc) {
|
|
|
|
boolean arc) throws IOException, InterruptedException {
|
|
|
|
return createClangInferCommand(
|
|
|
|
return createClangInferCommand(
|
|
|
|
folder,
|
|
|
|
folder,
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
null,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
ml_bucket,
|
|
|
|
ml_bucket,
|
|
|
|
arc);
|
|
|
|
arc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ImmutableList<String> createObjCPPInferCommand(
|
|
|
|
public static ImmutableList<String> createObjCPPInferCommand(
|
|
|
|
TemporaryFolder folder,
|
|
|
|
TemporaryFolder folder,
|
|
|
|
String sourceFile) {
|
|
|
|
String sourceFile) throws IOException, InterruptedException {
|
|
|
|
return createClangInferCommand(
|
|
|
|
return createClangInferCommand(
|
|
|
|
folder,
|
|
|
|
folder,
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjCPP,
|
|
|
|
Language.ObjCPP,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
null,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -391,7 +392,7 @@ public class InferRunner {
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
getXcodeRoot() + IOS_ISYSROOT_SUFFIX,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -404,7 +405,7 @@ public class InferRunner {
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
getXcodeRoot() + IOS_ISYSROOT_SUFFIX,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
false);
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -419,7 +420,7 @@ public class InferRunner {
|
|
|
|
sourceFile,
|
|
|
|
sourceFile,
|
|
|
|
Language.ObjC,
|
|
|
|
Language.ObjC,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
getXcodeRoot() + IOS_ISYSROOT_SUFFIX,
|
|
|
|
getXcodeRoot() + IPHONESIMULATOR_ISYSROOT_SUFFIX,
|
|
|
|
bucket,
|
|
|
|
bucket,
|
|
|
|
arc);
|
|
|
|
arc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|