File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ check_cxx_compiler_flag(-fno-lto FLANG_RT_HAS_FNO_LTO_FLAG)
248248# Different platform may have different name for the POSIX thread library.
249249# For example, libpthread.a on AIX. Search for it as it is needed when
250250# building the shared flang_rt.runtime.so.
251- find_package (Threads REQUIRED )
251+ find_package (Threads)
252252
253253# function checks
254254find_package (Backtrace)
Original file line number Diff line number Diff line change @@ -142,7 +142,9 @@ function (add_flangrt_library name)
142142 endif ()
143143 if (build_shared)
144144 add_library ("${name_shared} " SHARED ${extra_args} ${ARG_ADDITIONAL_HEADERS} ${ARG_UNPARSED_ARGUMENTS} )
145- target_link_libraries (${name_shared} PUBLIC Threads::Threads)
145+ if (Threads_FOUND)
146+ target_link_libraries (${name_shared} PUBLIC Threads::Threads)
147+ endif ()
146148 endif ()
147149
148150 if (libtargets)
You can’t perform that action at this time.
0 commit comments