Commit eda4c438 authored by Francisco Facioni's avatar Francisco Facioni Committed by Brad King
Browse files

Ninja: Fix CUDA device linking when using response files

Fix the logic added by commit d91b5a72 (Ninja: Add support for CUDA
nvcc response files, 2019-05-30, v3.15.0-rc1~8^2) to always use the CUDA
compiler response file flag for response files during device linking.
parent 5c788095
......@@ -171,20 +171,9 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile)
vars.Language = "CUDA";
std::string responseFlag;
std::string cmakeVarLang = "CMAKE_";
cmakeVarLang += this->TargetLinkLanguage;
// build response file name
std::string cmakeLinkVar = cmakeVarLang + "_RESPONSE_FILE_LINK_FLAG";
const char* flag = GetMakefile()->GetDefinition(cmakeLinkVar);
if (flag) {
responseFlag = flag;
} else if (this->TargetLinkLanguage != "CUDA") {
responseFlag = "@";
std::string responseFlag = this->GetMakefile()->GetSafeDefinition(
if (!useResponseFile || responseFlag.empty()) {
vars.Objects = "$in";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment