forked from OSchip/llvm-project
				
			On Linux, enable the gold plugin if we are using LTO.
llvm-svn: 143778
This commit is contained in:
		
							parent
							
								
									62c219809c
								
							
						
					
					
						commit
						4a089ad86d
					
				| 
						 | 
					@ -4462,7 +4462,7 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
 | 
					  addProfileRT(getToolChain(), Args, CmdArgs, getToolChain().getTriple());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (Args.hasArg(options::OPT_use_gold_plugin)) {
 | 
					  if (D.IsUsingLTO(Args) || Args.hasArg(options::OPT_use_gold_plugin)) {
 | 
				
			||||||
    CmdArgs.push_back("-plugin");
 | 
					    CmdArgs.push_back("-plugin");
 | 
				
			||||||
    std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
 | 
					    std::string Plugin = ToolChain.getDriver().Dir + "/../lib/LLVMgold.so";
 | 
				
			||||||
    CmdArgs.push_back(Args.MakeArgString(Plugin));
 | 
					    CmdArgs.push_back(Args.MakeArgString(Plugin));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue