mirror of https://github.com/exaloop/codon.git
Fix OpenMP 12+ issue
parent
1ec5cd2958
commit
c8b757859a
|
@ -68,7 +68,7 @@ endif()
|
|||
CPMAddPackage(
|
||||
NAME openmp
|
||||
GITHUB_REPOSITORY "exaloop/openmp"
|
||||
VERSION 13.0.0-fb9fc3c
|
||||
VERSION 12.0.1
|
||||
OPTIONS "CMAKE_BUILD_TYPE Release"
|
||||
"OPENMP_ENABLE_LIBOMPTARGET OFF"
|
||||
"OPENMP_STANDALONE_BUILD ON")
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "codon/util/semver/semver.h"
|
||||
#include "codon/util/toml++/toml.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/Support/Filesystem.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
|
||||
namespace codon {
|
||||
|
|
|
@ -54,6 +54,9 @@ SEQ_FUNC void seq_init(int flags) {
|
|||
GC_INIT();
|
||||
GC_set_warn_proc(GC_ignore_warn_proc);
|
||||
GC_allow_register_threads();
|
||||
// Disable libopenmp 12+'s hidden helper threads that
|
||||
// cause segfaults with omp_critical in Codon
|
||||
setenv("LIBOMP_NUM_HIDDEN_HELPER_THREADS", "0", true);
|
||||
// equivalent to: #pragma omp parallel { register_thread }
|
||||
__kmpc_fork_call(&dummy_loc, 0, (kmpc_micro)register_thread);
|
||||
seq_exc_init();
|
||||
|
|
Loading…
Reference in New Issue