Class OcamlNativePluginStep

  • All Implemented Interfaces:
    Step

    public class OcamlNativePluginStep
    extends ShellStep
    This step is run when `native_plugin=True` is set in an `ocaml_library` rule.

    This builds a `.cmxs` file from the corresponding `.cmo`/`cma` file that was built as part of the static library compilation.

    `.cmxs` files are generally used as dynamically-linked plugins for native-compiled ocaml. See the built-in `Dynlink` ocaml module for more info.

    • Field Detail

      • environment

        public final com.google.common.collect.ImmutableMap<String,​String> environment
      • cxxCompiler

        public final com.google.common.collect.ImmutableList<String> cxxCompiler
      • ocamlCompilerCommandPrefix

        public final com.google.common.collect.ImmutableList<String> ocamlCompilerCommandPrefix
      • flags

        public final com.google.common.collect.ImmutableList<String> flags
      • output

        public final Path output
      • cDepInput

        public final com.google.common.collect.ImmutableList<Arg> cDepInput
      • input

        public final com.google.common.collect.ImmutableList<Path> input
    • Constructor Detail

      • OcamlNativePluginStep

        public OcamlNativePluginStep​(AbsPath workingDirectory,
                                     com.google.common.collect.ImmutableMap<String,​String> environment,
                                     com.google.common.collect.ImmutableList<String> cxxCompiler,
                                     com.google.common.collect.ImmutableList<String> ocamlCompilerCommandPrefix,
                                     com.google.common.collect.ImmutableList<String> flags,
                                     Optional<String> stdlib,
                                     Path output,
                                     com.google.common.collect.ImmutableList<Arg> cDepInput,
                                     com.google.common.collect.ImmutableList<Path> input,
                                     com.google.common.collect.ImmutableList<String> ocamlInput)
    • Method Detail

      • getShortName

        public String getShortName()
        Returns:
        a short name/description for the command, such as "javac". Should fit on one line.
      • getShellCommandInternal

        protected com.google.common.collect.ImmutableList<String> getShellCommandInternal​(ExecutionContext context)
        Description copied from class: ShellStep
        Implementations of this method should not have any observable side-effects.
        Specified by:
        getShellCommandInternal in class ShellStep
      • getEnvironmentVariables

        public com.google.common.collect.ImmutableMap<String,​String> getEnvironmentVariables​(ExecutionContext context)
        Description copied from class: ShellStep
        Returns the environment variables to include when running this ShellStep.

        By default, this method returns an empty map.

        Overrides:
        getEnvironmentVariables in class ShellStep
        Parameters:
        context - that may be useful when determining environment variables to include.