This page provides instructions for building astcenc
from the sources in
this repository. The current master
branch is configured to statically build
binaries which each use a specific level of SIMD support (SSE2, SSE4.2,
or AVX2) selected at compile time. Binaries are produced with a name postfix
indicating the SIMD type in use; e.g. astcenc-avx2
for the AVX2 binary.
Builds for Windows use Visual Studio 2019, using the solution and/or project
files located in the Source/VS2019/
directory.
To compile a single SIMD variant from the command line, it is possible to use
the msbuild
utility from the Visual Studio installation, targeting the
specific project for the variant desired.
msbuild astcenc-<variant>.vcxproj /p:Configuration=Release /p:Platform=x64
To compile all supported SIMD variants from the command line, it is possible
to use the msbuild
utility from the Visual Studio installation, targeting the
solution.
msbuild astcenc.sln /p:Configuration=Release /p:Platform=x64
Builds for macOS and Linux use GCC or Clang and Make. They are tested using Clang 9.0, GCC 7.4, and Make 3.82. Using Clang 9.0 is recommended, as Clang builds out-perform GCC builds by approximately 20% in benchmarked test runs.
To compile a single SIMD variant compile with:
make -C Source CXX=clang++ VEC=[nointrin|sse2|sse4.2|avx2] -j8
... and use:
make -C Source CXX=clang++ VEC=[nointrin|sse2|sse4.2|avx2] clean
... to clean the build.
To compile all supported SIMD variants compile with:
make -sC Source CXX=clang++ batchbuild -j8
... and use:
make -sC Source batchclean -j8
... to clean the build.