c++buck

What are the common platform names in Buck?


I would like to build a cross-platform cxx_library with . I have different cpp files for the different platforms. According to the docs, I can handle this using platform_srcs, which is:

...a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched".


Solution

  • I am using the following:

    Don't forget to turn on should_remap_host_platform in order to avoid 'default' platform weirdness. In your .buckconfig:

    [cxx]
      should_remap_host_platform = true
    

    See: https://github.com/facebook/buck/issues/2073