Class CxxBuckConfig


  • public class CxxBuckConfig
    extends Object
    Contains platform independent settings for C/C++ rules.
    • Constructor Detail

      • CxxBuckConfig

        public CxxBuckConfig​(BuckConfig delegate)
    • Method Detail

      • getCxxFlavors

        public static com.google.common.collect.ImmutableSet<Flavor> getCxxFlavors​(BuckConfig config)
        Constructs set of flavors given in a .buckconfig file, as is specified by section names of the form cxx#{flavor name}.
      • getFlavoredConfigs

        public com.google.common.collect.ImmutableMap<Flavor,​CxxBuckConfig> getFlavoredConfigs()
      • getEnvironment

        public com.google.common.collect.ImmutableMap<String,​String> getEnvironment()
        Returns:
        the environment in which BuckConfig was created.
      • getGtestDefaultTestMainDep

        public Optional<BuildTarget> getGtestDefaultTestMainDep​(TargetConfiguration targetConfiguration)
        Returns:
        the BuildTarget which represents the main function that gtest tests should use by default (if no other main is given).
      • getAsflags

        public Optional<com.google.common.collect.ImmutableList<String>> getAsflags()
      • getAsppflags

        public Optional<com.google.common.collect.ImmutableList<String>> getAsppflags()
      • getCflags

        public Optional<com.google.common.collect.ImmutableList<String>> getCflags()
      • getCxxflags

        public Optional<com.google.common.collect.ImmutableList<String>> getCxxflags()
      • getCppflags

        public Optional<com.google.common.collect.ImmutableList<String>> getCppflags()
      • getCxxppflags

        public Optional<com.google.common.collect.ImmutableList<String>> getCxxppflags()
      • getCudaflags

        public Optional<com.google.common.collect.ImmutableList<String>> getCudaflags()
      • getCudappflags

        public Optional<com.google.common.collect.ImmutableList<String>> getCudappflags()
      • getHipflags

        public Optional<com.google.common.collect.ImmutableList<String>> getHipflags()
      • getHipppflags

        public Optional<com.google.common.collect.ImmutableList<String>> getHipppflags()
      • getAsmflags

        public Optional<com.google.common.collect.ImmutableList<String>> getAsmflags()
      • getAsmppflags

        public Optional<com.google.common.collect.ImmutableList<String>> getAsmppflags()
      • getLdflags

        public Optional<com.google.common.collect.ImmutableList<String>> getLdflags()
      • getArflags

        public Optional<com.google.common.collect.ImmutableList<String>> getArflags()
      • getRanlibflags

        public Optional<com.google.common.collect.ImmutableList<String>> getRanlibflags()
      • getMaximumTestOutputSize

        public long getMaximumTestOutputSize()
        Returns:
        the maximum size in bytes of test output to report in test results.
      • getLinkerProvider

        public Optional<LinkerProvider> getLinkerProvider​(LinkerProvider.Type defaultType)
        Construct a linker based on `ld` and `linker_platform` sections in the config.
        Parameters:
        defaultType - the default type for a linker if `linker_platform` is not specified in the config.
      • getHeaderVerificationOrIgnore

        public HeaderVerification getHeaderVerificationOrIgnore()
      • getLinkGroupsEnabledSetting

        public Optional<Boolean> getLinkGroupsEnabledSetting()
      • getLinkGroupsEnabled

        public boolean getLinkGroupsEnabled()
      • getPublicHeadersSymlinksSetting

        public Optional<Boolean> getPublicHeadersSymlinksSetting()
      • getPublicHeadersSymlinksEnabled

        public boolean getPublicHeadersSymlinksEnabled()
      • getPrivateHeadersSymlinksSetting

        public Optional<Boolean> getPrivateHeadersSymlinksSetting()
      • getPrivateHeadersSymlinksEnabled

        public boolean getPrivateHeadersSymlinksEnabled()
      • shouldCacheLinks

        public boolean shouldCacheLinks()
      • shouldCacheStrip

        public boolean shouldCacheStrip()
      • shouldCacheBinaries

        public boolean shouldCacheBinaries()
      • checkGTestTestList

        public boolean checkGTestTestList()
      • isPCHEnabled

        public boolean isPCHEnabled()
      • getDefaultFlavorsForRuleType

        public com.google.common.collect.ImmutableMap<String,​Flavor> getDefaultFlavorsForRuleType​(RuleType type)
      • getDebugPathSanitizerLimit

        public int getDebugPathSanitizerLimit()
      • getShouldRemapHostPlatform

        public boolean getShouldRemapHostPlatform()
        Returns:
        whether to remap to the underlying host platform or to use #default
      • isUniqueLibraryNameEnabled

        public boolean isUniqueLibraryNameEnabled()
      • getDefaultReexportAllHeaderDependencies

        public boolean getDefaultReexportAllHeaderDependencies()
      • getIndependentShlibInterfacesLdflags

        public Optional<com.google.common.collect.ImmutableList<String>> getIndependentShlibInterfacesLdflags()
        Returns:
        additional flags to pass to the linker when linking independent shared library interfaces.
      • isIndependentSharedLibraryInterfaces

        public boolean isIndependentSharedLibraryInterfaces()
        Returns:
        whether to generate a rule's shared library interface directly from it's object files, to avoid having to wait for it's shared library to build.
      • getDeclaredPlatforms

        public com.google.common.collect.ImmutableSet<Flavor> getDeclaredPlatforms()
        Returns:
        the list of flavors that buck will consider valid when building the target graph.
      • getBinaryExtension

        public Optional<String> getBinaryExtension()
        Returns:
        the extension to use for binaries (e.g. ".exe").
      • getSharedLibraryExtension

        public Optional<String> getSharedLibraryExtension()
        Returns:
        the extension to use for shared libraries (e.g. ".so").
      • getStaticLibraryExtension

        public Optional<String> getStaticLibraryExtension()
        Returns:
        the extension to use for static libraries (e.g. ".a").
      • getObjectFileExtension

        public Optional<String> getObjectFileExtension()
        Returns:
        the extension to use for object files (e.g. ".o").
      • getConflictingHeaderBasenameWhitelist

        public com.google.common.collect.ImmutableSortedSet<String> getConflictingHeaderBasenameWhitelist()
      • getHeaderMode

        public Optional<HeaderMode> getHeaderMode()
        Returns:
        the configured C/C++ header mode.
      • getUseDetailedUntrackedHeaderMessages

        public Boolean getUseDetailedUntrackedHeaderMessages()
        Returns:
        whether to generate more detailed untracked header messages.
      • getFilepathLengthLimited

        public Boolean getFilepathLengthLimited()
        Returns:
        whether short names for intermediate files should be used