mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fine-grained autolinking control
This change adds the following options to allow for greater control over the compiler's autolinking directive use: - '-disable-autolink-library': equivalent to an existing '-disable-autolink-framework', this option takes a library name as input and ensures the compiler does not produce an autolink directive '-l<library-name>'. - '-disable-autolink-frameworks': a boolean disable flag which turns off insertion of autolinking directives for all imported frameworks (of the type '-framework <framework-name>') - '-disable-all-autolinking': a boolean disable flag which turns off insertion of *any* autolinking directives. Resolves rdar://100859983
This commit is contained in:
@@ -2601,6 +2601,11 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
for (const Arg *A : Args.filtered(OPT_disable_autolink_framework)) {
|
||||
Opts.DisableAutolinkFrameworks.push_back(A->getValue());
|
||||
}
|
||||
for (const Arg *A : Args.filtered(OPT_disable_autolink_library)) {
|
||||
Opts.DisableAutolinkLibraries.push_back(A->getValue());
|
||||
}
|
||||
Opts.DisableFrameworkAutolinking = Args.hasArg(OPT_disable_autolink_frameworks);
|
||||
Opts.DisableAllAutolinking = Args.hasArg(OPT_disable_all_autolinking);
|
||||
|
||||
Opts.GenerateProfile |= Args.hasArg(OPT_profile_generate);
|
||||
const Arg *ProfileUse = Args.getLastArg(OPT_profile_use);
|
||||
|
||||
Reference in New Issue
Block a user