File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,12 @@ if (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
3636 list (APPEND DEFAULT_PROJECTS "bolt" )
3737endif ()
3838
39- set (DEFAULT_RUNTIMES "compiler-rt;libcxx" )
40-
39+ set (DEFAULT_RUNTIMES "compiler-rt;libcxx;openmp" )
4140# Don't build flang on Darwin due to:
4241# https://github.com/llvm/llvm-project/issues/160546
4342if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin" )
4443 list (APPEND DEFAULT_PROJECTS "flang" )
45- list (APPEND DEFAULT_RUNTIMES "openmp; flang-rt" )
44+ list (APPEND DEFAULT_RUNTIMES "flang-rt" )
4645endif ()
4746
4847if (NOT WIN32 )
@@ -146,7 +145,6 @@ endif()
146145if (LLVM_RELEASE_ENABLE_LINK_LOCAL_RUNTIMES)
147146 set_instrument_and_final_stage_var(LLVM_ENABLE_LIBCXX "ON" BOOL )
148147 set_instrument_and_final_stage_var(LLVM_STATIC_LINK_CXX_STDLIB "ON" BOOL )
149- set_instrument_and_final_stage_var(RUNTIMES_CMAKE_ARGS "-DLLVM_ENABLE_LIBCXX=ON" STRING )
150148 set (RELEASE_LINKER_FLAGS "-rtlib=compiler-rt --unwindlib=libunwind" )
151149 if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin" )
152150 set (RELEASE_LINKER_FLAGS "${RELEASE_LINKER_FLAGS} -static-libgcc" )
Original file line number Diff line number Diff line change 1111project (libompd)
1212cmake_minimum_required (VERSION 3.20.0)
1313
14- set (LIBOMPD_LD_STD_FLAGS FALSE CACHE BOOL
15- "Use -stdlibc++ instead of -libc++ library for C++ " )
16-
17- set (LIBCXX_DEP)
18- if ("libcxx" IN_LIST LLVM_ENABLE_RUNTIMES AND NOT ${LIBOMPD_LD_STD_FLAGS} )
19- set (LIBCXX_DEP cxx)
20- endif ()
21-
2214add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp)
2315
2416# libompd must not link against libomp, there is no code dependency.
25- add_dependencies (ompd omp ${LIBCXX_DEP} ) # ensure generated import library is created first
17+ add_dependencies (ompd omp) # ensure generated import library is created first
2618
2719set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
2820
21+ set (LIBOMPD_LD_STD_FLAGS FALSE CACHE BOOL
22+ "Use -stdlibc++ instead of -libc++ library for C++ " )
23+
2924if (${LIBOMPD_LD_STD_FLAGS} )
3025# Find and replace/add libstdc++ to compile flags
3126 STRING ( FIND "${CMAKE_CXX_FLAGS} " "-stdlib=libc++" OUT )
You can’t perform that action at this time.
0 commit comments