Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: pkg/front_end/lib/compiler_options.dart

Issue 2660553003: Extend front_end API to accept patch files (Closed)
Patch Set: cl comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/kernel_generator.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library front_end.compiler_options; 5 library front_end.compiler_options;
6 6
7 import 'compilation_error.dart'; 7 import 'compilation_error.dart';
8 import 'file_system.dart'; 8 import 'file_system.dart';
9 import 'physical_file_system.dart'; 9 import 'physical_file_system.dart';
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 /// Any Uri that resolves to "multi-root:///$rest" will be searched for 78 /// Any Uri that resolves to "multi-root:///$rest" will be searched for
79 /// at "$root/$rest", where "$root" is drawn from this list. 79 /// at "$root/$rest", where "$root" is drawn from this list.
80 /// 80 ///
81 /// Intended use: if the user has a Bazel workspace located at path 81 /// Intended use: if the user has a Bazel workspace located at path
82 /// "$workspace", this could be set to the file URIs corresponding to the 82 /// "$workspace", this could be set to the file URIs corresponding to the
83 /// paths for "$workspace", "$workspace/bazel-bin", 83 /// paths for "$workspace", "$workspace/bazel-bin",
84 /// and "$workspace/bazel-genfiles", effectively overlaying source and 84 /// and "$workspace/bazel-genfiles", effectively overlaying source and
85 /// generated files. 85 /// generated files.
86 List<Uri> multiRoots = []; 86 List<Uri> multiRoots = [];
87 87
88 /// Sets the platform bit, which determines which patch files should be
89 /// applied to the SDK.
90 ///
91 /// The value should be a power of two, and should match the `PLATFORM` bit
92 /// flags in sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart. If
93 /// zero, no patch files will be applied.
94 int platformBit;
95
96 /// The declared variables for use by configurable imports and constant 88 /// The declared variables for use by configurable imports and constant
97 /// evaluation. 89 /// evaluation.
98 Map<String, String> declaredVariables; 90 Map<String, String> declaredVariables;
99 91
100 /// The [FileSystem] which should be used by the front end to access files. 92 /// The [FileSystem] which should be used by the front end to access files.
101 /// 93 ///
102 /// All file system access performed by the front end goes through this 94 /// All file system access performed by the front end goes through this
103 /// mechanism, with one exception: if no value is specified for 95 /// mechanism, with one exception: if no value is specified for
104 /// [packagesFileUri], the packages file is located using the actual physical 96 /// [packagesFileUri], the packages file is located using the actual physical
105 /// file system. TODO(paulberry): fix this. 97 /// file system. TODO(paulberry): fix this.
106 FileSystem fileSystem = PhysicalFileSystem.instance; 98 FileSystem fileSystem = PhysicalFileSystem.instance;
107 99
108 /// Whether to generate code for the SDK when compiling a whole-program. 100 /// Whether to generate code for the SDK when compiling a whole-program.
109 bool compileSdk = false; 101 bool compileSdk = false;
110 102
111 /// Whether a modular build compiles only the files listed explicitly or if it 103 /// Whether a modular build compiles only the files listed explicitly or if it
112 /// compiles dependencies as well. 104 /// compiles dependencies as well.
113 /// 105 ///
114 /// This option is intended only for modular APIs like `kernelForBuildUnit`. 106 /// This option is intended only for modular APIs like `kernelForBuildUnit`.
115 /// These APIs by default ensure that builds are hermetic, where all files 107 /// These APIs by default ensure that builds are hermetic, where all files
116 /// that will be compiled are listed explicitly and all other dependencies 108 /// that will be compiled are listed explicitly and all other dependencies
117 /// are covered by summary files. 109 /// are covered by summary files.
118 /// 110 ///
119 /// When this option is true, these APIs will treat any dependency that is 111 /// When this option is true, these APIs will treat any dependency that is
120 /// not described in a summary as if it was explictly listed as an input. 112 /// not described in a summary as if it was explictly listed as an input.
121 bool chaseDependencies = false; 113 bool chaseDependencies = false;
122 114
123 /// Whether to intepret Dart sources in strong-mode. 115 /// Whether to intepret Dart sources in strong-mode.
124 bool strongMode = true; 116 bool strongMode = true;
117
118 // All options below are target-specific options.
119 //
120 // TODO(sigmund): revisit the right layout for these options. We might want to
121 // split them out into a separate bag of options or provide factories for
122 // common combinations of these options.
123
124 /// Patch files to apply on the core libraries for a specific target platform.
125 ///
126 /// Keys on this map are expected to be `dart:*` URIs. The values can be
127 /// either absolute or relative URIs. Absolute URIs are read directly, while
128 /// relative URIs are resolved from the [sdkRoot].
129 Map<Uri, List<Uri>> targetPatches = {};
125 } 130 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/kernel_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698