https://bugs.llvm.org/show_bug.cgi?id=48234
Bug ID: 48234
Summary: CMake LANGUAGE property misused for .S assembler
sources
Product: Build scripts
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: cmake
Assignee: unassignedb...@nondot.org
Reporter: brad.k...@kitware.com
CC: llvm-bugs@lists.llvm.org
CMake's "LANGUAGE" source file property is documented to mean that the source
file is *written* in the specified language. However, several places in LLVM
are using "LANGUAGE C" to mean "use the C compiler":
*
https://github.com/llvm/llvm-project/blob/release/11.x/compiler-rt/cmake/Modules/AddCompilerRT.cmake#L110-L119
*
https://github.com/llvm/llvm-project/blob/release/11.x/libunwind/src/CMakeLists.txt#L32-L34
*
https://github.com/llvm/llvm-project/blob/release/11.x/openmp/runtime/src/CMakeLists.txt#L119-L122
This usage is incorrect.
CMake 3.19.0 adds "-x c" when compiling source files with "LANGUAGE C" in order
to support C sources with non-standard extensions. That was reported to CMake
as breaking LLVM:
* https://gitlab.kitware.com/cmake/cmake/-/issues/21469
CMake 3.19.1 will probably revert the change to restore compatibility, but a
policy will be added to make the change again in a compatible way. The OLD
behavior of such a policy will be deprecated by definition, so LLVM needs to be
updated to stop doing this.
There is a comment in libunwind about the reason for "LANGUAGE C" being to work
around CMake not honoring OSX_ARCHITECTURES for assembly sources. This has
been fixed in CMake 3.19.0:
* https://gitlab.kitware.com/cmake/cmake/-/issues/20771
* https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5152
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs