Search in sources :

Example 1 with Options

use of com.google.devtools.build.lib.analysis.config.BuildConfiguration.Options in project bazel by bazelbuild.

the class CrosstoolConfigurationIdentifier method fromOptions.

/**
   * Creates a new crosstool configuration from the given crosstool release and
   * configuration options.
   */
public static CrosstoolConfigurationIdentifier fromOptions(BuildOptions buildOptions) {
    Options options = buildOptions.get(BuildConfiguration.Options.class);
    CppOptions cppOptions = buildOptions.get(CppOptions.class);
    return new CrosstoolConfigurationIdentifier(options.cpu, cppOptions.cppCompiler, cppOptions.glibc);
}
Also used : BuildConfiguration(com.google.devtools.build.lib.analysis.config.BuildConfiguration) BuildOptions(com.google.devtools.build.lib.analysis.config.BuildOptions) Options(com.google.devtools.build.lib.analysis.config.BuildConfiguration.Options)

Example 2 with Options

use of com.google.devtools.build.lib.analysis.config.BuildConfiguration.Options in project bazel by bazelbuild.

the class ObjcConfigurationLoader method create.

@Override
public ObjcConfiguration create(ConfigurationEnvironment env, BuildOptions buildOptions) throws InvalidConfigurationException, InterruptedException {
    Options options = buildOptions.get(BuildConfiguration.Options.class);
    ObjcCommandLineOptions objcOptions = buildOptions.get(ObjcCommandLineOptions.class);
    validate(objcOptions);
    return new ObjcConfiguration(objcOptions, options, env.getBlazeDirectories());
}
Also used : BuildConfiguration(com.google.devtools.build.lib.analysis.config.BuildConfiguration) BuildOptions(com.google.devtools.build.lib.analysis.config.BuildOptions) Options(com.google.devtools.build.lib.analysis.config.BuildConfiguration.Options) FragmentOptions(com.google.devtools.build.lib.analysis.config.FragmentOptions)

Aggregations

BuildConfiguration (com.google.devtools.build.lib.analysis.config.BuildConfiguration)2 Options (com.google.devtools.build.lib.analysis.config.BuildConfiguration.Options)2 BuildOptions (com.google.devtools.build.lib.analysis.config.BuildOptions)2 FragmentOptions (com.google.devtools.build.lib.analysis.config.FragmentOptions)1