macOS: Add architecture flags only for native ASM dialect

ASM dialects like NASM have languages names such as ASM_NASM.
However such ASM dialects don't support the architecture flags, so match only
the full name.

Fixes #21553.
This commit is contained in:
Raul Tambre
2020-12-04 17:17:02 +02:00
parent 1525385b20
commit fcabf4a47e

View File

@@ -1879,7 +1879,7 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
target->GetAppleArchs(config, archs);
if (!archs.empty() &&
(lang == "C" || lang == "CXX" || lang == "OBJ" || lang == "OBJCXX" ||
cmHasLiteralPrefix(lang, "ASM"))) {
lang == "ASM")) {
for (std::string const& arch : archs) {
if (filterArch.empty() || filterArch == arch) {
flags += " -arch ";