Class OcamlNativePluginStep

  • All Implemented Interfaces:

    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<String,​String> environment
      • cxxCompiler

        public final<String> cxxCompiler
      • ocamlCompilerCommandPrefix

        public final<String> ocamlCompilerCommandPrefix
      • flags

        public final<String> flags
      • output

        public final Path output
      • cDepInput

        public final<Arg> cDepInput
      • input

        public final<Path> input
    • Constructor Detail

      • OcamlNativePluginStep

        public OcamlNativePluginStep​(AbsPath workingDirectory,
                           <String,​String> environment,
                           <String> cxxCompiler,
                           <String> ocamlCompilerCommandPrefix,
                           <String> flags,
                                     Optional<String> stdlib,
                                     Path output,
                           <Arg> cDepInput,
                           <Path> input,
                           <String> ocamlInput)
    • Method Detail

      • getShortName

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

        protected<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<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.

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