# Does BinaryBuilder have an option to build only for the current platform?

**URL:** <https://discourse.julialang.org/t/does-binarybuilder-have-an-option-to-build-only-for-the-current-platform/74033>\
**Category:** General Usage\
**Tags:** binarybuilder\
**Created:** [January 4, 2022, 2:19pm UTC](https://discourse.julialang.org/t/does-binarybuilder-have-an-option-to-build-only-for-the-current-platform/74033 "2022-01-04T14:19:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![melonedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/melonedo/32/15503_2.png) [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Post date:** [January 4, 2022, 2:19pm UTC](https://discourse.julialang.org/t/does-binarybuilder-have-an-option-to-build-only-for-the-current-platform/74033/1 "2022-01-04T14:19:11Z")

</div>

BinaryBuilder has a very nice cross-platform toolchain, but if I want to use it to build locally for execution, i.e. ship source code and a build script because this is more flexible, in which case building for platforms other than the current one is pointless, how can I auto-detect current platform and only build for it?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [January 4, 2022, 2:34pm UTC](https://discourse.julialang.org/t/does-binarybuilder-have-an-option-to-build-only-for-the-current-platform/74033/2 "2022-01-04T14:34:34Z")

</div>

`HostPlatform()` is your current platform:

```julia
julia> HostPlatform()
Linux x86_64 {cxxstring_abi=cxx11, julia_version=1.6.4, libc=glibc, libgfortran_version=4.0.0, libstdcxx_version=3.4.29}

```

so you can have

```julia
platforms = [
    HostPlatform()
]

```

but please do note that it contains some extra ABI specifications (like C++ string ABI and libgfortran version) that may be overly restrictive, in case you want to publish a JLL package.
