c++buck

Does Buck allow prebuilt Cxx libraries to have multiple library files?


I have a large library built out of multiple .dylib files, which I would like to import as one prebuilt_cxx_library. However, the command only allows a string for the lib_name.

What is the recommended way to include a large third-party library with multiple .dylib files?


Solution

  • Each prebuilt_cxx_library corresponds to one dynamic or static library.

    However, you can use exported_deps to give other prebuilt libraries to consumers:

    prebuilt_cxx_library(
      name = 'a',
      ...
    )
    
    prebuilt_cxx_library(
      name = 'b',
      ...
      exported_deps = [
        '//:a',
      ], 
    )
    

    Users of //:b will now get //:a also.