mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[ddc] Always explicitly pass null safety mode
Add explicit mode flags for DDC related compiles. Change-Id: Icb9e21a4b8786a0de620bcc387cafbe8d27d0e86 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277042 Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>
This commit is contained in:
parent
8e7b1119b3
commit
b9469f452a
|
@ -87,7 +87,6 @@ class SourceToSummaryDillStep implements IOModularStep {
|
|||
extraArgs = [
|
||||
'--libraries-file',
|
||||
'$rootScheme:///sdk/lib/libraries.json',
|
||||
'--no-sound-null-safety',
|
||||
];
|
||||
assert(transitiveDependencies.isEmpty);
|
||||
} else {
|
||||
|
@ -111,6 +110,7 @@ class SourceToSummaryDillStep implements IOModularStep {
|
|||
'--multi-root-scheme',
|
||||
rootScheme,
|
||||
...extraArgs,
|
||||
'--no-sound-null-safety',
|
||||
'--output',
|
||||
'${toUri(module, dillId)}',
|
||||
if (!module.isSdk) ...[
|
||||
|
@ -175,7 +175,6 @@ class DDCStep implements IOModularStep {
|
|||
'--compile-sdk',
|
||||
'--libraries-file',
|
||||
'$rootScheme:///sdk/lib/libraries.json',
|
||||
'--no-sound-null-safety',
|
||||
];
|
||||
assert(transitiveDependencies.isEmpty);
|
||||
} else {
|
||||
|
@ -206,6 +205,7 @@ class DDCStep implements IOModularStep {
|
|||
rootScheme,
|
||||
...sources,
|
||||
...extraArgs,
|
||||
'--no-sound-null-safety',
|
||||
for (String flag in flags) '--enable-experiment=$flag',
|
||||
...transitiveDependencies
|
||||
.where((m) => !m.isSdk)
|
||||
|
|
|
@ -65,6 +65,7 @@ class DevCompilerRunner implements CompilerRunner {
|
|||
'--packages=$packageConfigPath',
|
||||
'--modules=es6',
|
||||
'--dart-sdk-summary=${ddcSdkSummary.path}',
|
||||
'--no-sound-null-safety',
|
||||
'-o',
|
||||
outputFile.toFilePath(),
|
||||
inputFile.toFilePath()
|
||||
|
|
|
@ -239,7 +239,7 @@ void main(List<String> args) async {
|
|||
'--dart-sdk-summary=$sdkOutlineDill',
|
||||
for (var summary in summaries) '--summary=$summary',
|
||||
for (var experiment in experiments) '--enable-experiment=$experiment',
|
||||
if (soundNullSafety) '--sound-null-safety',
|
||||
if (soundNullSafety) '--sound-null-safety' else '--no-sound-null-safety',
|
||||
if (options['packages'] != null) '--packages=${options['packages']}',
|
||||
if (emitDebugSymbols) '--emit-debug-symbols',
|
||||
if (canaryFeatures) '--canary',
|
||||
|
|
|
@ -606,7 +606,10 @@ class DevCompilerConfiguration extends CompilerConfiguration {
|
|||
..._configuration.sharedOptions,
|
||||
..._experimentsArgument(_configuration, testFile),
|
||||
...testFile.ddcOptions,
|
||||
if (_configuration.nnbdMode == NnbdMode.strong) '--sound-null-safety',
|
||||
if (_configuration.nnbdMode == NnbdMode.strong)
|
||||
'--sound-null-safety'
|
||||
else
|
||||
'--no-sound-null-safety',
|
||||
if (_configuration.configuration.builderTag == 'canary') '--canary',
|
||||
// The file being compiled is the last argument.
|
||||
args.last
|
||||
|
|
|
@ -2418,6 +2418,7 @@
|
|||
"--enable-asserts",
|
||||
"pkg/dev_compiler/bin/dartdevc.dart",
|
||||
"-k",
|
||||
"--sound-null-safety",
|
||||
"-o",
|
||||
"out/ReleaseX64/dartdevk.js",
|
||||
"pkg/dev_compiler/bin/dartdevc.dart"
|
||||
|
@ -2673,6 +2674,7 @@
|
|||
"--enable-asserts",
|
||||
"pkg/dev_compiler/bin/dartdevc.dart",
|
||||
"-k",
|
||||
"--sound-null-safety",
|
||||
"-o",
|
||||
"xcodebuild/ReleaseX64/dartdevk.js",
|
||||
"pkg/dev_compiler/bin/dartdevc.dart"
|
||||
|
|
|
@ -29,7 +29,7 @@ application_snapshot("dartdevc") {
|
|||
rebase_path("../../sdk"),
|
||||
"--dart-sdk-summary",
|
||||
rebase_path(sdk_outline_dill),
|
||||
"-k",
|
||||
"--no-sound-null-safety",
|
||||
"-o",
|
||||
"dartdevc.js",
|
||||
rebase_path("../../pkg/dev_compiler/bin/dartdevc.dart"),
|
||||
|
@ -218,6 +218,8 @@ template("dartdevc_kernel_compile") {
|
|||
|
||||
if (invoker.sound_null_safety) {
|
||||
args += [ "--sound-null-safety" ]
|
||||
} else {
|
||||
args += [ "--no-sound-null-safety" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +290,8 @@ template("compile_dartdevc_platform") {
|
|||
sdk_outline_sound_dill,
|
||||
]
|
||||
} else {
|
||||
args += [ "--nnbd-weak" ]
|
||||
|
||||
outputs = [
|
||||
sdk_full_dill,
|
||||
sdk_outline_dill,
|
||||
|
@ -368,6 +372,8 @@ template("dartdevc_sdk_js") {
|
|||
|
||||
if (invoker.sound_null_safety) {
|
||||
args += [ "--sound-null-safety" ]
|
||||
} else {
|
||||
args += [ "--no-sound-null-safety" ]
|
||||
}
|
||||
|
||||
if (ddc_canary) {
|
||||
|
|
Loading…
Reference in a new issue