oneapi-src / oneTBB

oneAPI Threading Building Blocks (oneTBB)
https://oneapi-src.github.io/oneTBB/
Apache License 2.0
5.61k stars 1.01k forks source link

ClangCL compilation error #374

Closed ghost closed 3 years ago

ghost commented 3 years ago

Just cloned this repo and build cmake generated project (cmake -DCMAKE_BUILD_TYPE=Debug -DTBB_STRICT=OFF -DTBB_TEST=OFF -A x64 -T ClangCL)

Platform: Windows 10, x64 Branch: master

Error: 1>C:\Users\user\modules\oneTBB\src\tbb/misc.h(257,12): error : use of undeclared identifier '_xbegin'; did you mean 'xbegin'? 1>C:\Users\user\modules\oneTBB\src\tbb/misc.h(271,5): error : use of undeclared identifier '_xabort'

The Preprocessor __TBB_TSX_INTRINSICS_PRESENT is valid and extern defenition of _xbegin is valid too, but it's found by Visual Studio in immintrin.h I guess that header doesn't include to TBB project.

alexey-katranov commented 3 years ago

Thank you for the report. @pavelkumbrasev, can you please look at the issue?

Iliamish commented 3 years ago

Fixed on https://github.com/oneapi-src/oneTBB/pull/499 .