On devcb.h , you can find this code:
Code
//**************************************************************************
//  DETECT PROBLEMATIC COMPILERS
//**************************************************************************

#if defined(__GNUC__) && !defined(__clang__)
#if __GNUC__ >= 8
#define MAME_DEVCB_GNUC_BROKEN_FRIEND 1
#endif // __GNUC__ >= 8
#endif // defined(__GNUC__) && !defined(__clang__)

As the compiler identifies as Clang, this code is not triggered.

For now, just adding:
Code
#define MAME_DEVCB_GNUC_BROKEN_FRIEND 1
after the previous code, will make MAME compile.

At least until this point:
Code
Objective-C compiling 3rdparty/bgfx/src/renderer_mtl.mm...
In file included from ../../../../../3rdparty/bgfx/src/renderer_mtl.mm:10:
../../../../../3rdparty/bgfx/src/renderer_mtl.h:365:12: error: instance method '-setLabel:' not found
      (return type defaults to 'id') [-Werror,-Wobjc-method-access]
                                [m_obj setLabel:@(_label)];