[Openmp-commits] [PATCH] D24959: [cmake] Fix for a bug https://llvm.org/bugs/show_bug.cgi?id=30489 "Cannot build with -DLIBOMP_FORTRAN_MODULES=True"
Paul Osmialowski via Openmp-commits
openmp-commits at lists.llvm.org
Tue Sep 27 10:55:09 PDT 2016
pawosm01 added a comment.
In https://reviews.llvm.org/D24959#554036, @jlpeyton wrote:
> I think this introduces a race during parallel builds where the `POST_BUILD` for the targets `libomp-mod` and `omp` both try to create the `LIBOMP_EXPORTS_CMN_DIR`.
>
> To fix this, directories can be created during configuration time using file(MAKE_DIRECTORY ...). That way, all these lines can be removed:
>
> COMMAND ${CMAKE_COMMAND} -E make_directory ...
>
>From what I found this code was never meant to run in parallel, it is only included when:
Move files to exports/ directory if requested
=============================================
if(${LIBOMP_COPY_EXPORTS})
include(LibompExports)
endif()
...while LIBOMP_COPY_EXPORTS is described:
1. Should the libomp library and generated headers be copied into the original source exports/ directory
2. Turning this to FALSE aids **parallel builds ** to **not interfere** with each other.
3. Currently, the testsuite module expects the just built OpenMP library to be located inside the exports/
4. directory. TODO: have testsuite run under llvm-lit directly. We can then get rid of copying to exports/
set(LIBOMP_COPY_EXPORTS TRUE CACHE STRING
"Should exports be copied into source exports/ directory?")
...so I guess my fix is still ok.
Repository:
rL LLVM
https://reviews.llvm.org/D24959
More information about the Openmp-commits
mailing list