[IR] Turned off IR validation for everything but our tests

This commit is contained in:
Igor Chevdar
2020-11-17 18:27:45 +05:00
committed by Stanislav Erokhin
parent e5f7cef594
commit 606fbe37fc
8 changed files with 27 additions and 2 deletions
@@ -34,6 +34,7 @@ class RunExternalTestGroup extends JavaExec {
def dist = UtilsKt.getKotlinNativeDist(project)
def enableKonanAssertions = true
def verifyIr = true
String outputDirectory = null
String goldValue = null
// Checks test's output against gold value and returns true if the output matches the expectation
@@ -100,6 +101,9 @@ class RunExternalTestGroup extends JavaExec {
if (enableKonanAssertions) {
args "-ea"
}
if (verifyIr) {
args "-Xverify-ir"
}
if (project.hasProperty("test_verbose")) {
println("Files to compile: $filesToCompile")
println(args)
@@ -333,11 +333,21 @@ open class KonanStandaloneTest : KonanLocalTest() {
@Input @Optional
var enableKonanAssertions = true
@Input @Optional
var verifyIr = true
/**
* Compiler flags used to build a test.
*/
var flags: List<String> = listOf()
get() = if (enableKonanAssertions) field + "-ea" else field
get() {
val result = field.toMutableList()
if (enableKonanAssertions)
result += "-ea"
if (verifyIr)
result += "-Xverify-ir"
return result
}
fun getSources(): Provider<List<String>> = project.provider {
val sources = buildCompileList(project.file(source).toPath(), outputDirectory)