mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add -disable-testable-attr-requires-testable-module.
...which allows "@testable import" to work with modules not compiled for testing. This isn't generally safe, but should be fine for clients like SourceKit which just need to have the API available and might not be able to properly rebuild the original target for testing. We may revisit this in the future. Swift SVN r26629
This commit is contained in:
@@ -638,6 +638,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
= A->getOption().matches(OPT_enable_objc_attr_requires_foundation_module);
|
||||
}
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_enable_testable_attr_requires_testable_module,
|
||||
OPT_disable_testable_attr_requires_testable_module)) {
|
||||
Opts.EnableTestableAttrRequiresTestableModule
|
||||
= A->getOption().matches(OPT_enable_testable_attr_requires_testable_module);
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_debug_constraints_attempt)) {
|
||||
unsigned attempt;
|
||||
if (StringRef(A->getValue()).getAsInteger(10, attempt)) {
|
||||
|
||||
Reference in New Issue
Block a user