[clang] [compiler-rt] [clang][Darwin] Prefer the toolchain-provided libc++.dylib if there is one (PR #170303)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 11:06:36 PST 2025
zeroomega wrote:
We are seeing test failures on `Clang :: Driver/darwin-link-libcxx.cpp` after this patch landed:
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 11
/b/s/w/ir/x/w/llvm_build/bin/clang --driver-mode=g++ -### /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp 2>&1 --target=x86_64-apple-darwin -ccc-install-dir /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/Inputs/basic_darwin_toolchain_no_libcxx/usr/bin | /b/s/w/ir/x/w/llvm_build/bin/FileCheck -DTOOLCHAIN=/b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/Inputs/basic_darwin_toolchain_no_libcxx --check-prefix=CHECK-1 /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp
# executed command: /b/s/w/ir/x/w/llvm_build/bin/clang --driver-mode=g++ '-###' /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp --target=x86_64-apple-darwin -ccc-install-dir /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/Inputs/basic_darwin_toolchain_no_libcxx/usr/bin
# executed command: /b/s/w/ir/x/w/llvm_build/bin/FileCheck -DTOOLCHAIN=/b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/Inputs/basic_darwin_toolchain_no_libcxx --check-prefix=CHECK-1 /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp
# .---command stderr------------
# | /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp:16:13: error: CHECK-1: expected string not found in input
# | // CHECK-1: "/usr/bin/ld"
# | ^
# | <stdin>:1:1: note: scanning from here
# | Fuchsia clang version 22.0.0git (https://llvm.googlesource.com/llvm-project 190b8d0b4f19e1c3d68c5d153ec7be71a9969192)
# | ^
# | <stdin>:6:1083: note: possible intended match here
# | "/b/s/w/ir/x/w/llvm_build/bin/llvm" "clang" "-cc1" "-triple" "x86_64-apple-macosx10.4.0" "-Wundef-prefix=TARGET_OS_" "-Werror=undef-prefix" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-obj" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "darwin-link-libcxx.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=all" "-ffp-contract=on" "-fno-rounding-math" "-funwind-tables=2" "-faligned-alloc-unavailable" "-fno-sized-deallocation" "-fcompatibility-qualified-id-block-type-checking" "-fvisibility-inlines-hidden-static-local-var" "-fbuiltin-headers-in-system-modules" "-fdefine-target-os-macros" "-target-cpu" "core2" "-tune-cpu" "generic" "-debugger-tuning=lldb" "-fdebug-compilation-dir=/b/s/w/ir/x/w/llvm_build/tools/clang/test/Driver" "-fcoverage-compilation-dir=/b/s/w/ir/x/w/llvm_build/tools/clang/test/Driver" "-resource-dir" "/b/s/w/ir/x/w/llvm_build/lib/clang/22" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/b/s/w/ir/x/w/llvm_build/lib/clang/22/include" "-internal-externc-isystem" "/usr/include" "-internal-iframework" "/System/Library/Frameworks" "-internal-iframework" "/System/Library/SubFrameworks" "-internal-iframework" "/Library/Frameworks" "-fdeprecated-macro" "-ferror-limit" "19" "-fblocks" "-fblocks-runtime-optional" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fobjc-dispatch-method=non-legacy" "-fcxx-exceptions" "-fexceptions" "-fmax-type-align=16" "-fdwarf2-cfi-asm" "-o" "/b/s/w/ir/x/t/lit-tmp-uv_390yr/darwin-link-libcxx-8c3d38.o" "-x" "c++" "/b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp"
# | ^
# |
# | Input file: <stdin>
# | Check file: /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: Fuchsia clang version 22.0.0git (https://llvm.googlesource.com/llvm-project 190b8d0b4f19e1c3d68c5d153ec7be71a9969192)
# | check:16'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: Target: x86_64-apple-darwin
# | check:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: Thread model: posix
# | check:16'0 ~~~~~~~~~~~~~~~~~~~~
# | 4: InstalledDir: /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/Inputs/basic_darwin_toolchain_no_libcxx/usr/bin
# | check:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: Build config: +assertions
# | check:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: "/b/s/w/ir/x/w/llvm_build/bin/llvm" "clang" "-cc1" "-triple" "x86_64-apple-macosx10.4.0" "-Wundef-prefix=TARGET_OS_" "-Werror=undef-prefix" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-obj" "-dumpdir" "a-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "darwin-link-libcxx.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=all" "-ffp-contract=on" "-fno-rounding-math" "-funwind-tables=2" "-faligned-alloc-unavailable" "-fno-sized-deallocation" "-fcompatibility-qualified-id-block-type-checking" "-fvisibility-inlines-hidden-static-local-var" "-fbuiltin-headers-in-system-modules" "-fdefine-target-os-macros" "-target-cpu" "core2" "-tune-cpu" "generic" "-debugger-tuning=lldb" "-fdebug-compilation-dir=/b/s/w/ir/x/w/llvm_build/tools/clang/test/Driver" "-fcoverage-compilation-dir=/b/s/w/ir/x/w/llvm_build/tools/clang/test/Driver" "-resource-dir" "/b/s/w/ir/x/w/llvm_build/lib/clang/22" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/b/s/w/ir/x/w/llvm_build/lib/clang/22/include" "-internal-externc-isystem" "/usr/include" "-internal-iframework" "/System/Library/Frameworks" "-internal-iframework" "/System/Library/SubFrameworks" "-internal-iframework" "/Library/Frameworks" "-fdeprecated-macro" "-ferror-limit" "19" "-fblocks" "-fblocks-runtime-optional" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fobjc-dispatch-method=non-legacy" "-fcxx-exceptions" "-fexceptions" "-fmax-type-align=16" "-fdwarf2-cfi-asm" "-o" "/b/s/w/ir/x/t/lit-tmp-uv_390yr/darwin-link-libcxx-8c3d38.o" "-x" "c++" "/b/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/darwin-link-libcxx.cpp"
# | check:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:16'1 ? possible intended match
# | 7: "/b/s/w/ir/x/w/llvm_build/bin/ld64.lld" "-demangle" "-dynamic" "-arch" "x86_64" "-platform_version" "macos" "10.4.0" "10.4.0" "-mllvm" "-enable-linkonceodr-outlining" "-o" "a.out" "-lcrt1.o" "/b/s/w/ir/x/t/lit-tmp-uv_390yr/darwin-link-libcxx-8c3d38.o" "-lc++" "-lSystem" "-lgcc_s.1"
# | check:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
Failed task: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-host-linux-x64/b8696300887931519761/overview
Could you revert your change and fix it please?
https://github.com/llvm/llvm-project/pull/170303
More information about the llvm-commits
mailing list