Included klibs: Rename -Xsource-library -> -Xinclude

This commit is contained in:
Ilya Matveev
2019-08-22 17:07:07 +07:00
committed by Ilya Matveev
parent d3ab5b0969
commit 174c1ed5f3
5 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ To update the blackbox compiler tests set TeamCity build number in `gradle.prope
./gradlew -Ptest_verbose :backend.native:tests:mpp_optional_expectation
* **-Ptest_two_stage** enables two-stage compilation of tests. If two-stage compilation is enabled, test sources are compiled into a klibrary
and then a final native binary is produced from this klibrary using the -Xsource-library compiler flag.
and then a final native binary is produced from this klibrary using the -Xinclude compiler flag.
./gradlew -Ptest_two_stage backend.native:tests:array0
@@ -160,8 +160,7 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
@Argument(
value = SOURCE_LIBRARY_ARG,
valueDescription = "<path>",
description = "A library to be processed in the same manner as source files.\n" +
"Must be one of libraries passed with '-library'"
description = "A path to an intermediate library that should be processed in the same manner as source files.\n"
)
var sourceLibraries: Array<String>? = null
@@ -217,4 +216,4 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
const val EMBED_BITCODE_FLAG = "-Xembed-bitcode"
const val EMBED_BITCODE_MARKER_FLAG = "-Xembed-bitcode-marker"
const val STATIC_FRAMEWORK_FLAG = "-Xstatic-framework"
const val SOURCE_LIBRARY_ARG = "-Xsource-library"
const val SOURCE_LIBRARY_ARG = "-Xinclude"
@@ -114,7 +114,7 @@ private sealed class FeaturedLibrariesReporter {
"$kind library $libraryName can't be used as a source library"
override fun notIncludedLibraryMessageTitle(): String =
"Following libraries are declared as source libraries with -Xsource-library, but not included to the build:"
"Following libraries are declared as source libraries with -Xinclude, but not included to the build:"
}
private class CoveredLibraryReporter(configuration: CompilerConfiguration): BaseReporter(configuration) {
@@ -622,7 +622,7 @@ fun runTest() {
// Two-stage compilation.
def klibPath = "${exePath}.klib"
runCompiler(compileList, klibPath, flags + ["-p", "library"])
runCompiler([], exePath, flags + ["-l", klibPath, "-Xsource-library=$klibPath"])
runCompiler([], exePath, flags + ["-l", klibPath, "-Xinclude=$klibPath"])
} else {
// Regular compilation.
runCompiler(compileList, exePath, flags)
@@ -184,7 +184,7 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
addAll(secondStageExtraOpts())
addArg("-l", klibPath)
add("-Xsource-library=${klibPath}")
add("-Xinclude=${klibPath}")
}
/** Args passed to the compiler at both stages of the two-stage compilation and during the singe-stage compilation. */