cmNinjaNormalTargetGenerator: don't use || true for link-what-you-use

With the `|| true`, a linker error before running link-what-you-use
would also use the `|| true` fragment and unconditionally succeed. Just
skip the addition since `--lwyu=` ignores the return value anyways.

Fixes #18524
This commit is contained in:
Ben Boeckel
2018-10-29 15:49:44 -04:00
parent d697f4eb48
commit 85aceda026

View File

@@ -506,7 +506,6 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
gt.GetFullPath(cfgName, cmStateEnums::RuntimeBinaryArtifact,
/*realname=*/true));
cmakeCommand += targetOutputReal;
cmakeCommand += " || true";
linkCmds.push_back(std::move(cmakeCommand));
}
return linkCmds;