BinaryBuilderPlatformExtensions.AnyPlatform
— TypeAnyPlatform()
A special platform to be used to build platform-independent tarballs, like those containing only header files. FileProduct
is the only product type allowed with this platform.
BinaryBuilderPlatformExtensions.CrossPlatform
— TypeCrossPlatform(host::Platform, target::Platform)
A special platform to be used when building cross-compiling toolchains; it contains a host
platform and a target
platform. Both platforms are preserved through encoding one of the platforms into tags (e.g. by adding a prefix to the set of tags, a la target_arch=x86_64
, target_os=windows
, etc...).
We also support setting the host
or target
as an AnyPlatform
, allowing the creation of any-host but target-specific binaries (such as LinuxKernelHeaders_jll
) or host- specific but any-target binaries (such as certain builds of Clang_jll
). In order to properly lower this Platform
to a serialized representation (both in text as well as an Artifacts.toml
file) we must determine ways to properly encode the host
and target
platforms while maintaining the overall serialization as one that is parseable as the basic Platform
type. To this end, we generally choose the host
as the "base" platform, then encode the target
within the tags, except when the host
is an AnyPlatform
, in which case we flip and use the target
as the "base" platform. To disambiguate these two cases, we set the sentinel tag target=any
for when the target
is an AnyPlatform
, and host=any
for when the host
is an AnyPlatform
. Because of these two tags, all valid CrossPlatform
objects are identifiable by the presence of these tags (or the equally-identifiying target_arch
/host_os
etc... tags).
In the event that you try to turn a "normal" Platform
object into a CrossPlatform
, it will return a CrossPlatform
object that has host
and target
equal to eacother.
BinaryBuilderPlatformExtensions.CrossPlatform
— MethodCrossPlatform(encoded_platform::Platform)
Given a platform that has its target encoded in tags, split them out into a proper CrossPlatform
object.
BinaryBuilderPlatformExtensions.BBHostPlatform
— MethodBBHostPlatform()
This provides a stripped-down form of HostPlatform()
that does not include constraints on the julia version, the libgfortran version, etc... This is useful when you need the most generic form of what will work on the host machine, but don't care about compatibility with all of Julia's deps. This platform will include arch, os, libc type and cxxstring_abi.
BinaryBuilderPlatformExtensions.dlext
— Methoddlext(p::AbstractPlatform)
Return the dynamic library extension for the given platform.
BinaryBuilderPlatformExtensions.exeext
— Methodexeext(p::AbstractPlatform)
Return the executable extension for the given platform. Currently only Windows platforms return ".exe", all other platforms return "".
BinaryBuilderPlatformExtensions.gcc_platform
— Methodgcc_platform(p::AbstractPlatform)
Strip out any tags that are not the basic annotations like libc
and call_abi
.
BinaryBuilderPlatformExtensions.gcc_target_triplet
— Methodgcc_target_triplet(p::AbstractPlatform)
Return the kind of triplet that gcc would give for the given platform. For a CrossPlatform
, applies to the target
.
BinaryBuilderPlatformExtensions.macos_version
— Methodmacos_version(p::AbstractPlatform)
If no os_version
is specified in p
, default to the oldest we support in the Julia world, which is macOS 10.8
(kernel version 14), but if it is actually specified, then return the specified value (mapping from kernel version to macOS version).
julia> macos_version(Platform("x86_64", "macos"; os_version="18"))
"10.14"
BinaryBuilderPlatformExtensions.nbits
— Methodnbits(p::AbstractPlatform)
Return the number of bits in the architecture of the given Platform. Usually either 32 or 64.
BinaryBuilderPlatformExtensions.proc_family
— Methodproc_family(p::AbstractPlatform)
Return the processor family of the architecture of the given Platform. Usually one of "intel", "arm" or "power".