[llvm-bugs] [Bug 49339] New: kmp_lock.cpp doesn't compile with clang-cl
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 24 05:03:01 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49339
Bug ID: 49339
Summary: kmp_lock.cpp doesn't compile with clang-cl
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: hans at chromium.org
CC: llvm-bugs at lists.llvm.org
Blocks: 48902
This reproduces both with the current 12.x branch and main branch (as of
abbdb5639c70d167bd66cd62296927330782c3b4)
Building the openmp runtime with clang-cl fails as below (i was doing a 32-bit
build but I'm not sure that matters):
[2212/5188] Building CXX object
projects\openmp\runtime\src\CMakeFiles\omp.dir\kmp_lock.cpp.obj
FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.obj
C:\src\llvm_package_1200-rc2\build32_stage0\bin\clang-cl.exe /nologo -TP
-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Domp_EXPORTS -Iprojects\openmp\runtime\src
-IC:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src -Iinclude
-IC:\src\llvm_package_1200-rc2\llvm-project\llvm\include
-IC:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\i18n
-IC:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\include
-IC:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\thirdparty\ittnotify
/DWIN32 /D_WINDOWS /Zc:inline /Zc:__cplusplus /Zc:strictStrings /Oi
/Zc:rvalueCast /Brepro /bigobj /W4 -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough
-Wcovered-switch-default -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wsuggest-override -Wstring-conversion /Gw -Wcast-qual -Wformat-pedantic
-Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic /MT /O2 /Ob2
-D _CRT_SECURE_NO_WARNINGS -D _CRT_SECURE_NO_DEPRECATE -D _WINDOWS -D _WINNT -D
_WIN32_WINNT=0x0501 -D _USRDLL -UNDEBUG -std:c++14 -Wno-covered-switch-default
-Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized /GS
/EHsc -mrtm /arch:SSE2 -msse2 /showIncludes
/Foprojects\openmp\runtime\src\CMakeFiles\omp.dir\kmp_lock.cpp.obj
/Fdprojects\openmp\runtime\src\CMakeFiles\omp.dir\ -c
C:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\kmp_lock.cpp
C:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\kmp_lock.cpp(1721,9):
warning: '_XABORT_CODE' macro redefined [-Wmacro-redefined]
#define _XABORT_CODE(x) ((unsigned char)(((x) >> 24) & 0xFF))
^
C:\src\llvm_package_1200-rc2\build32_stage0\lib\clang\12.0.0\include\rtmintrin.h(24,9):
note: previous definition is here
#define _XABORT_CODE(x) (((x) >> 24) & 0xFF)
^
C:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\kmp_lock.cpp(1733,21):
error: functions that differ only in their return type cannot be overloaded
static __inline int _xbegin() {
~~~ ^
C:\src\llvm_package_1200-rc2\build32_stage0\lib\clang\12.0.0\include\rtmintrin.h(30,1):
note: previous definition is here
_xbegin(void)
^
C:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\kmp_lock.cpp(1781,22):
error: redefinition of '_xend'
static __inline void _xend() {
^
C:\src\llvm_package_1200-rc2\build32_stage0\lib\clang\12.0.0\include\rtmintrin.h(36,1):
note: previous definition is here
_xend(void)
^
C:\src\llvm_package_1200-rc2\llvm-project\openmp\runtime\src\kmp_lock.cpp(1798,9):
warning: '_xabort' macro redefined [-Wmacro-redefined]
#define _xabort(ARG) _asm _emit 0xc6 _asm _emit 0xf8 _asm _emit ARG
^
C:\src\llvm_package_1200-rc2\build32_stage0\lib\clang\12.0.0\include\rtmintrin.h(41,9):
note: previous definition is here
#define _xabort(imm) __builtin_ia32_xabort((imm))
^
2 warnings and 2 errors generated.
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=48902
[Bug 48902] [meta] 12.0.0 Release Blockers
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210224/aa43e8ef/attachment-0001.html>
More information about the llvm-bugs
mailing list