[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
Wed Mar 15 09:22:47 PDT 2023


sgraenitz added inline comments.


================
Comment at: lldb/test/CMakeLists.txt:39
+if (LLDB_TEST_OBJC_GNUSTEP_DIR)
+  message(STATUS "Found GNUstep ObjC runtime: ${LLDB_TEST_OBJC_GNUSTEP_DIR}/${gnustep_info}")
+endif()
----------------
sgraenitz wrote:
> theraven wrote:
> > DavidSpickett wrote:
> > > sgraenitz wrote:
> > > > Might be worth a `FindGNUstep.cmake` at some point? (Or is there one somewhere?)
> > > > 
> > > > Windows default install dir:
> > > > ```
> > > > -- Found GNUstep ObjC runtime: C:/Program Files (x86)/libobjc/lib/objc.dll
> > > > ```
> > > > 
> > > > Linux default install dir:
> > > > ```
> > > > -- Found GNUstep ObjC runtime: /usr/local/lib/libobjc.so
> > > > ```
> > > I think we generally use UPPERCASE names for cmake variables.
> > This is somewhat complicated.  If `gnustep-config` exists, the runtime supports installing itself into a location defined by the gnustep-make install, which supports NeXT, Apple, and FHS-style layouts.  It's probably not worth trying to autodetect the general case.
> > This is somewhat complicated.
> > It's probably not worth trying to autodetect the general case.
> 
> Configuring with cmake and running the install target gives me these paths. Do you mean I should remove them and just let the user set `LLDB_TEST_OBJC_GNUSTEP_DIR`?
> 
> > If gnustep-config exists, the runtime supports installing itself into a location defined by the gnustep-make install, which supports NeXT, Apple, and FHS-style layouts.
> 
> Right now, I am assuming to find the shared library in the `lib` subdirectory and headers in `include`. Is that different in the other layouts? Do we need to support that?
> 
> > I think we generally use UPPERCASE names for cmake variables.
> 
> I  think the convention is: UPPERCASE for global variables, lowercase for local variables
@theraven I installed `gnustep-config` locally, but I don't see how to get the libobjc2 install dir from it. So far, I always built from source and (for me) this works well with the current CMake code. Should we keep it like this or can you give me advice on how to improve it? Thanks.


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