diff --git a/Installation-from-source.md b/Installation-from-source.md index a236c09..f0cf95c 100644 --- a/Installation-from-source.md +++ b/Installation-from-source.md @@ -1,8 +1,9 @@ -# Installation from source +# Building from source -## Install build-dependencies +The build system has recently been refactored to be more modular and easier to extend. For that reason, +some small but necessary changes were made that might break compatibility with how Hyperscan was built. -## Debian/Ubuntu +## Common Dependencies (Debian/Ubuntu) In order to build on Debian/Ubuntu make sure you install the following build-dependencies @@ -10,6 +11,10 @@ In order to build on Debian/Ubuntu make sure you install the following build-dep $ sudo apt build-essential cmake ragel pkg-config libsqlite3-dev libpcap-dev ``` +## Common Dependencies (Other) + +TBD + ## Configure & build In order to configure with `cmake` first create and cd into a build directory: @@ -27,14 +32,29 @@ $ cmake ../ Common options for Cmake are: -* `-DBUILD_STATIC_LIBS=On/Off` Build static libraries -* `-DBUILD_SHARED_LIBS=On/Off` Build shared libraries -* `-DCMAKE_BUILD_TYPE=[Release|Debug|RelWithDebInfo|MinSizeRel]` Configure build type and determine optimizations and certain features, for examples, Fat runtimes are not compatible with Debug mode at the moment. +* `-DBUILD_STATIC_LIBS=[On|Off]` Build static libraries +* `-DBUILD_SHARED_LIBS=[On|Off]` Build shared libraries (if none are set static libraries are built by default) +* `-DCMAKE_BUILD_TYPE=[Release|Debug|RelWithDebInfo|MinSizeRel]` Configure build type and determine optimizations and certain features. +* `-DUSE_CPU_NATIVE=[On|Off]` Native CPU detection is off by default, however it is possible to build a performance-oriented non-fat library tuned to your CPU +* `-DFAT_RUNTIME=[On|Off]` Fat Runtime is only available for X86 32-bit/64-bit and AArch64 architectures and only on Linux. It is incompatible with `Debug` type and `USE_CPU_NATIVE`. -And then you can run `make` in the same directory, if you have a multi-core system with `N` cores, running +### Specific options for Intel/AMD CPUs + + + + +### Specific options for Arm 64-bit CPUs + +* `-DBUILD_SVE=[On|Off]` Enable code for SVE CPUs, like the Graviton3. Not much code is ported just for SVE , but enabling SVE code production, does improve code generation, see [Benchmarks](https://github.com/VectorCamp/vectorscan/wiki/Benchmarks). +* `-DBUILD_SVE2=[On|Off]` Enable code for SVE2 CPUs, implies `BUILD_SVE`. Most non-Neon code is written for SVE2 +* `-DBUILD_SVE2_BITPERM=[On|Off]` Enable code for SVE2_BITPERM harwdare feature, implies `BUILD_SVE2`. + +## Build + +If `cmake` has completed successfully you can run `make` in the same directory, if you have a multi-core system with `N` cores, running ``` $ make -j ``` -will speed up the process. If all goes well, you should have the vectorscan library +will speed up the process. If all goes well, you should have the vectorscan library compiled. \ No newline at end of file