[PATCH] D92357: clang/darwin: Don't use response files with ld64, do use them with ld64.lld.darwinnew

Keith Smiley via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 18:19:20 PST 2020


keith added a comment.

It looks like at least in the `-Wl` case clang passes the file through directly, so I'm not surprises that it repros there:

  % clang -Wl, at shell_dialogs_unittests.rsp -v
  Apple clang version 12.0.0 (clang-1200.0.32.27)
  Target: x86_64-apple-darwin19.6.0
  Thread model: posix
  InstalledDir: /Applications/Xcode-12.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
   "/Applications/Xcode-12.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode-12.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 10.15.0 10.15.6 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -o a.out -L/usr/local/lib @shell_dialogs_unittests.rsp -lSystem /Applications/Xcode-12.2.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.osx.a
  clang: error: unable to execute command: Segmentation fault: 11
  clang: error: linker command failed due to signal (use -v to see invocation)

I _don't_ actually see this reproing when using `clang @shell_dialogs_unittests.rsp`:

  % /Users/ksmiley/dev/llvm-project/build/bin/clang-12 @shell_dialogs_unittests.rsp
  clang version 12.0.0 (https://github.com/llvm/llvm-project bbf02e18f53681c079f7a88b2726d0714d92e1a0)
  Target: x86_64-apple-darwin19.6.0
  Thread model: posix
  InstalledDir: /Users/ksmiley/dev/llvm-project/build/bin
   "/usr/bin/ld" @/var/folders/h6/6btvg47n7y1f5xxz4_n9rsd40000gn/T/response-5a15ec.txt

Which I believe makes sense because clang is processing each argument and writing the response file itself.

Is there any other case you've hit besides the missing trailing newline that causes this issue? While I'm sure Apple will fix that in due time I wonder if that's considered a "valid enough" response to warrant the revert here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92357/new/

https://reviews.llvm.org/D92357



More information about the cfe-commits mailing list