diff options
author | Raul Tambre <raul@tambre.ee> | 2020-08-21 07:57:32 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-08-22 06:16:21 (GMT) |
commit | 940fc629628f505e57c0d3a7a524a8447ee6f49b (patch) | |
tree | 5971c5bfdd2b64746ad7ae1f43940be703caeabb | |
parent | 692bc2de9475d14a2f40b94d88ea91db2df5311c (diff) | |
download | CMake-940fc629628f505e57c0d3a7a524a8447ee6f49b.zip CMake-940fc629628f505e57c0d3a7a524a8447ee6f49b.tar.gz CMake-940fc629628f505e57c0d3a7a524a8447ee6f49b.tar.bz2 |
macOS: Respect OSX_ARCHITECTURES for ASM
Fixes #20771.
-rw-r--r-- | Help/release/dev/asm-osx-architectures.rst | 5 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Help/release/dev/asm-osx-architectures.rst b/Help/release/dev/asm-osx-architectures.rst new file mode 100644 index 0000000..d8d0660 --- /dev/null +++ b/Help/release/dev/asm-osx-architectures.rst @@ -0,0 +1,5 @@ +asm-osx-architectures +--------------------- + +* The :prop_tgt:`OSX_ARCHITECTURES` target property is now respected for the + ``ASM`` language. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2380cce..5b15713 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1875,8 +1875,9 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags, if (this->Makefile->IsOn("APPLE") && this->EmitUniversalBinaryFlags) { std::vector<std::string> archs; target->GetAppleArchs(config, archs); - if (!archs.empty() && !lang.empty() && - (lang[0] == 'C' || lang[0] == 'F' || lang[0] == 'O')) { + if (!archs.empty() && + (lang == "C" || lang == "CXX" || lang == "OBJ" || lang == "OBJCXX" || + cmHasLiteralPrefix(lang, "ASM"))) { for (std::string const& arch : archs) { if (filterArch.empty() || filterArch == arch) { flags += " -arch "; |