[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

Louis Dionne via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 07:44:05 PDT 2024


ldionne wrote:

@petrhosek @vitalybuka Gentle ping.

If the CI is green, I will land this next week unless someone objects to it. I don't want to purposefully break anyone's build, but I also don't want to hold off on this change forever if there's nothing actionable.

Last time in https://reviews.llvm.org/D134221#3853050, @petrhosek you said:

> All Fuchsia builders started failing after this change landed with the following error:
> 
> ```
> /b/s/w/ir/x/w/staging/llvm_build/./bin/clang++ --target=x86_64-unknown-fuchsia --sysroot=/b/s/w/ir/x/w/cipd/sdk/arch/x64/sysroot -fPIC --target=x86_64-unknown-fuchsia -I/b/s/w/ir/x/w/cipd/sdk/pkg/sync/include -I/b/s/w/ir/x/w/cipd/sdk/pkg/fdio/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections  -O3 -DNDEBUG  -L/b/s/w/ir/x/w/cipd/sdk/arch/x64/lib -Wl,-z,defs  -nostdlib++ -shared -Wl,-soname,libc++abi.so.1 -o lib/libc++abi.so.1.0 libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_aux_runtime.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_default_handlers.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_demangle.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_exception_storage.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_guard.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_handlers.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_vector.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_virtual.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_exception.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_stdexcept.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_typeinfo.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/abort_message.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/fallback_malloc.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/private_typeinfo.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/stdlib_new_delete.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_noexception.cpp.obj libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/cxa_thread_atexit.cpp.obj  -lc  -lgcc  -lgcc_s && :
> ld.lld: error: unable to find library -lgcc
> ld.lld: error: unable to find library -lgcc_s
> ```
> There's no libgcc on Fuchsia, we always use compiler-rt builtins so it's not clear to me why the build is now trying link libgcc when targeting Fuchsia after this change.
> 

It looks like this *could* be caused by a check for something like `if (TARGET cxxabi_shared)` that used to be false and is now true, but it's hard to say without more information (and ideally reproducing locally).

https://github.com/llvm/llvm-project/pull/80007


More information about the cfe-commits mailing list