@@ -133,42 +133,6 @@ static void validateBridgingHeaderArgs(DiagnosticEngine &diags,
133
133
}
134
134
}
135
135
136
- static void validateDeploymentTarget (DiagnosticEngine &diags,
137
- const ArgList &args) {
138
- const Arg *A = args.getLastArg (options::OPT_target);
139
- if (!A)
140
- return ;
141
-
142
- // Check minimum supported OS versions.
143
- llvm::Triple triple (llvm::Triple::normalize (A->getValue ()));
144
- if (triple.isMacOSX ()) {
145
- if (triple.isMacOSXVersionLT (10 , 9 ))
146
- diags.diagnose (SourceLoc (), diag::error_os_minimum_deployment,
147
- " OS X 10.9" );
148
- } else if (triple.isiOS ()) {
149
- if (triple.isTvOS ()) {
150
- if (triple.isOSVersionLT (9 , 0 )) {
151
- diags.diagnose (SourceLoc (), diag::error_os_minimum_deployment,
152
- " tvOS 9.0" );
153
- return ;
154
- }
155
- }
156
- if (triple.isOSVersionLT (7 ))
157
- diags.diagnose (SourceLoc (), diag::error_os_minimum_deployment,
158
- " iOS 7" );
159
- if (triple.isArch32Bit () && !triple.isOSVersionLT (11 )) {
160
- diags.diagnose (SourceLoc (), diag::error_ios_maximum_deployment_32,
161
- triple.getOSMajorVersion ());
162
- }
163
- } else if (triple.isWatchOS ()) {
164
- if (triple.isOSVersionLT (2 , 0 )) {
165
- diags.diagnose (SourceLoc (), diag::error_os_minimum_deployment,
166
- " watchOS 2.0" );
167
- return ;
168
- }
169
- }
170
- }
171
-
172
136
static void validateWarningControlArgs (DiagnosticEngine &diags,
173
137
const ArgList &args) {
174
138
if (args.hasArg (options::OPT_suppress_warnings) &&
@@ -261,7 +225,6 @@ static void validateAutolinkingArgs(DiagnosticEngine &diags,
261
225
// / Perform miscellaneous early validation of arguments.
262
226
static void validateArgs (DiagnosticEngine &diags, const ArgList &args) {
263
227
validateBridgingHeaderArgs (diags, args);
264
- validateDeploymentTarget (diags, args);
265
228
validateWarningControlArgs (diags, args);
266
229
validateProfilingArgs (diags, args);
267
230
validateDebugInfoArgs (diags, args);
@@ -820,7 +783,6 @@ Driver::buildCompilation(const ToolChain &TC,
820
783
std::unique_ptr<DerivedArgList> TranslatedArgList (
821
784
translateInputAndPathArgs (*ArgList, workingDirectory));
822
785
823
- // TODO: We should check which validations could be moved to toolchain specific classes.
824
786
validateArgs (Diags, *TranslatedArgList);
825
787
826
788
// Perform toolchain specific args validation.
0 commit comments