forked from OSchip/llvm-project
Driver/Darwin: Forward -ObjC when linking, which may be needed when using static
libraries with Objective-C code. llvm-svn: 116758
This commit is contained in:
parent
c769d6e007
commit
767bbabb24
|
@ -2504,6 +2504,12 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
Args.AddAllArgs(CmdArgs, options::OPT_m_Separate);
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_r);
|
||||
|
||||
// Forward -ObjC when either -ObjC or -ObjC++ is used, to force loading
|
||||
// members of static archive libraries which implement Objective-C classes or
|
||||
// categories.
|
||||
if (Args.hasArg(options::OPT_ObjC) || Args.hasArg(options::OPT_ObjCXX))
|
||||
CmdArgs.push_back("-ObjC");
|
||||
|
||||
CmdArgs.push_back("-o");
|
||||
CmdArgs.push_back(Output.getFilename());
|
||||
|
||||
|
|
Loading…
Reference in New Issue