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 committed 2020-12-04 17:29:14 +02:00
1 parent 1525385b20
commit fcabf4a47e
1 file changed
+1 -1
+1 -1
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 ";