mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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:
@@ -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 ";
|
||||
|
||||
Reference in New Issue
Block a user