mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 11:02:04 +08:00
[Flang][driver] Do not emit -latomic on link line on Windows (#164648)
Flang on Windows added `-latomic` to the link line. This library does not exist on Windows and the linker gives a warning.
This commit is contained in:
@@ -851,8 +851,11 @@ void ToolChain::addFortranRuntimeLibs(const ArgList &Args,
|
||||
options::OPT_fno_openmp, false)) {
|
||||
Driver::OpenMPRuntimeKind OMPRuntime = getDriver().getOpenMPRuntime(Args);
|
||||
ToolChain::RuntimeLibType RuntimeLib = GetRuntimeLibType(Args);
|
||||
if (OMPRuntime == Driver::OMPRT_OMP && RuntimeLib == ToolChain::RLT_Libgcc)
|
||||
if ((OMPRuntime == Driver::OMPRT_OMP &&
|
||||
RuntimeLib == ToolChain::RLT_Libgcc) &&
|
||||
!getTriple().isKnownWindowsMSVCEnvironment()) {
|
||||
CmdArgs.push_back("-latomic");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user