toolchain_extras v0.2.0 NervesExtras.Toolchain behaviour
Link to this section Summary
Functions
Create an archive of the artifact
Bootstrap is called as the final phase of loading the Nerves environment. It is used typically for setting / unsetting any system environment variables. For example, if we were building a C cross compiler, we would use the bootstrap phase to override CC to point to our compiler
Callback implementation for Nerves.Artifact.BuildRunner.build/3
Build path link should return the location inside the Artifact.build_path
that represents the final artifact. This is used to symlink the global
artifact to the local build_path location
Clean up all the build files
Callbacks
The bootstrap callback is the called during the final setup of a Nerves “build” environment.
This platform package looks for the :toolchain_extras
key in the nerves package configuration
Return the location in the build path to where the global artifact is linked
Link to this section Functions
Create an archive of the artifact
Bootstrap is called as the final phase of loading the Nerves environment. It is used typically for setting / unsetting any system environment variables. For example, if we were building a C cross compiler, we would use the bootstrap phase to override CC to point to our compiler.
Callback implementation for Nerves.Package.Platform.bootstrap/1
.
Callback implementation for Nerves.Artifact.BuildRunner.build/3
.
Build path link should return the location inside the Artifact.build_path
that represents the final artifact. This is used to symlink the global
artifact to the local build_path location.
Callback implementation for Nerves.Package.Platform.build_path_link/1
.
Clean up all the build files
Link to this section Callbacks
bootstrap(Nerves.Package.t()) :: :ok | {:error, error :: term()}
The bootstrap callback is the called during the final setup of a Nerves “build” environment.
This platform package looks for the :toolchain_extras
key in the nerves package configuration.
An example from the :toolchain_extras_pru_cgt
extras toolchain mix.exs nerves_package
function:
toolchain_extras: [
env_var: "PRU_CGT",
build_path_link: "ti-cgt-pru",
build_script: "build.sh",
clean_files: ["ti-cgt-pru"],
archive_script: "scripts/archive.sh"
]
TODO: Fill out documentation for configuration options.
build_path_link(package :: Nerves.Package.t()) :: build_path_link :: String.t()
Return the location in the build path to where the global artifact is linked