forked from OSchip/llvm-project
parent
317ebfe18e
commit
70b8d76e64
|
@ -686,6 +686,7 @@ def single__module : Flag<"-single_module">;
|
|||
def specs_EQ : Joined<"-specs=">;
|
||||
def specs : Separate<"-specs">, Flags<[Unsupported]>;
|
||||
def static_libgcc : Flag<"-static-libgcc">;
|
||||
def static_libstdcxx : Flag<"-static-libstdc++">;
|
||||
def static : Flag<"-static">, Flags<[NoArgumentUnused]>;
|
||||
def std_default_EQ : Joined<"-std-default=">;
|
||||
def std_EQ : Joined<"-std=">;
|
||||
|
|
|
@ -4375,7 +4375,13 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
|
||||
|
||||
if (D.CCCIsCXX && !Args.hasArg(options::OPT_nostdlib)) {
|
||||
bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) &&
|
||||
!Args.hasArg(options::OPT_static);
|
||||
if (OnlyLibstdcxxStatic)
|
||||
CmdArgs.push_back("-Bstatic");
|
||||
ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
|
||||
if (OnlyLibstdcxxStatic)
|
||||
CmdArgs.push_back("-Bdynamic");
|
||||
CmdArgs.push_back("-lm");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue