[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 27 05:59:15 PDT 2023


sgraenitz added a comment.

In D146058#4223575 <https://reviews.llvm.org/D146058#4223575>, @labath wrote:

> What kind of setup is necessary to make that work? If it's not too complicated, I think we could make something work.

Thanks, that'd be awesome!

The last official release is from 2020, so for the time being it seems best to build and install from TOT once -- @theraven please correct me if I am wrong:

  > git clone https://github.com/gnustep/libobjc2
  > cd libobjc2
  > git submodule init && git submodule update
  > CC=clang-15 CXX=clang++-15 cmake -Bbuild -GNinja -DTESTS=On .
  > cd build
  > ninja
  ...
  > ctest
  ...
  100% tests passed, 0 tests failed out of 198
  > ninja install
  ...
  -- Installing: /usr/local/lib/libobjc.so.4.6
  -- Installing: /usr/local/lib/libobjc.so
  ...

Then apply this patch and re-run CMake. The new test should popup and pass:

  > arc patch D146058
  > cd build && cmake .
  ...
  -- Found GNUstep ObjC runtime: /usr/local/lib/libobjc.so
  ...
  > bin/llvm-lit --filter=objc-gnustep -vv tools/lldb/test
  -- Testing: 1 of 1979 tests, 1 workers --
  PASS: lldb-shell :: Expr/objc-gnustep-print.m (1 of 1)
  
  Testing Time: 2.06s
    Excluded: 1583
    Passed  :    1



> Speaking generally, my only concern with that is the that the bot doesn't remain broken (or even worse -- flaky!) for long stretches of time. I don't have time to debug objc failures, and reverting other people's changes because they break something that might be an "experimental" feature for quite some time could be problematic.

Absolutely. What do you think is the best way to prevent that?

Right now, the `gnustep` test would run whenever `libobjc.so` was found. A lit config reset like this would make it `UNSUPPORTED` (but it gets wiped with the next CMake run):

  > grep objc_gnustep_dir build/tools/lldb/test/Shell/lit.site.cfg.py 
  config.objc_gnustep_dir = ""

How can I change this to support the well-behaved bot? Add `-DLLDB_TEST_OBJC_GNUSTEP=Off`? Or should it be off by default and enabled on demand?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146058



More information about the lldb-commits mailing list