diff --git a/llvm/utils/gn/build/libs/pthread/BUILD.gn b/llvm/utils/gn/build/libs/pthread/BUILD.gn --- a/llvm/utils/gn/build/libs/pthread/BUILD.gn +++ b/llvm/utils/gn/build/libs/pthread/BUILD.gn @@ -5,9 +5,15 @@ libs = [ "pthread" ] } +config("pthread_link_time_config") { + visibility = [ ":pthread" ] + ldflags = [ "-pthread" ] +} + group("pthread") { # On Android, bionic has built-in support for pthreads. if (llvm_enable_threads && current_os != "win" && current_os != "android") { public_configs = [ ":pthread_config" ] + all_dependent_configs = [ ":pthread_link_time_config" ] } }