Revert "JS: remove -XtypedArraysEnabled flag (always true now)"

This reverts commit 4a5e9bb
This commit is contained in:
Anton Bannykh
2018-04-09 17:18:12 +03:00
parent 56d1184515
commit 703611a15c
12 changed files with 1219 additions and 25 deletions
@@ -99,6 +99,10 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
// Advanced options
@GradleOption(DefaultValues.BooleanTrueDefault::class)
@Argument(value = "-Xtyped-arrays", description = "Translate primitive arrays to JS typed arrays")
var typedArrays: Boolean by FreezableVar(true)
@GradleOption(DefaultValues.BooleanFalseDefault::class)
@Argument(value = "-Xfriend-modules-disabled", description = "Disable internal declaration export")
var friendModulesDisabled: Boolean by FreezableVar(false)
@@ -385,6 +385,8 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
configuration.put(JSConfigurationKeys.META_INFO, true);
}
configuration.put(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, arguments.getTypedArrays());
configuration.put(JSConfigurationKeys.FRIEND_PATHS_DISABLED, arguments.getFriendModulesDisabled());
if (!arguments.getFriendModulesDisabled() && arguments.getFriendModules() != null) {
+1
View File
@@ -2,6 +2,7 @@ Usage: kotlinc-js <options> <source files>
where advanced options include:
-Xfriend-modules=<path> Paths to friend modules
-Xfriend-modules-disabled Disable internal declaration export
-Xtyped-arrays Translate primitive arrays to JS typed arrays
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
-Xcoroutines={enable|warn|error}
Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier