[PATCH] D38185: Implementation of OMPT as specified in OpenMP 5.0 Preview 1

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 09:09:32 PST 2018


Hahnfeld added inline comments.


================
Comment at: openmp/trunk/runtime/src/ompt-general.cpp:118
+  ompt_start_tool_t next_tool = NULL;
+  next_tool = (ompt_start_tool_t)dlsym(RTLD_NEXT, "ompt_start_tool");
+  if (next_tool)
----------------
hans wrote:
> This fails on Windows obviously. When building with clang it looks like this:
> 
> 
> ```
> [903/3933] Building CXX object projects\openmp\runtime\src\CMakeFiles\omp.dir\ompt-general.cpp.obj
> FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/ompt-general.cpp.obj
> \src\llvm\build.release\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_DEBUG_POINTER_IMPL="" -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 -I..\projects\openmp\runtime\src -Iinclude -I..\include -I..\projects\openmp\runtime\src\i18n -I..\projects\openmp\runtime\src\include\50 -I..\projects\openmp\runtime\src\thirdparty\ittnotify /DWIN32 /D_WINDOWS   /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /Brepro /W4  -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion /MT /O2 /Ob2   -UNDEBUG -D _CRT_SECURE_NO_WARNINGS -D _CRT_SECURE_NO_DEPRECATE -D _WINDOWS -D _WINNT -D _WIN32_WINNT=0x0501 -D _USRDLL -Wno-sign-compare -Wno-unused-function -Wno-unused-local-typedef -Wno-unused-value -Wno-unused-variable -Wno-switch -Wno-covered-switch-default -Wno-deprecated-register -Wno-gnu-anonymous-struct -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-missing-braces -Wno-comment -Wno-self-assign -Wno-vla-extension -Wno-format-pedantic /GS /EHsc /showIncludes /Foprojects\openmp\runtime\src\CMakeFiles\omp.dir\ompt-general.cpp.obj /Fdprojects\openmp\runtime\src\CMakeFiles\omp.dir\ -c ..\projects\openmp\runtime\src\ompt-general.cpp
> ..\projects\openmp\runtime\src\ompt-general.cpp(131,32):  error: use of undeclared identifier 'RTLD_NEXT'
>       (ompt_start_tool_t)dlsym(RTLD_NEXT, "ompt_start_tool");
>                                ^
> ```
> 
> But for some reason I don't see that when building with MSVC.
Because it's `#if KMP_OS_UNIX`. If that's not set with `clang-cl` on Windows then there is definitely something wrong!


Repository:
  rL LLVM

https://reviews.llvm.org/D38185





More information about the llvm-commits mailing list