Refer to Installing AOCL to install the AOCL-Utils library. Then, complete the following steps to install AOCL-LibM:
Download source from GitHub (amd/aocl-libm-ose).
Navigate to the folder:
$ cd aocl-libm-ose
Install virtualenv:
$ pip install virtualenv
Initialize the environment for correct architecture using Visual Studio
vcvarsall.batfile using following command:$ "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
Activate virtual environment and install SCons inside:
$ virtualenv -p python .venv3 $ .venv3\Scripts\activate $ pip install scons
Build the project using the clang compiler:
Basic build command: scons ALM_CC=<clang-cl executable path> ALM_CXX=<clang-cl executable path> --aocl_utils_install_path="<libaoclutils library path>" Additional Flags: Build in parallel: -j<number of parallel builds> Verbosity: --verbose=1 Debug mode build: --debug_mode=libs
For example:
$ scons -j32 ALM_CC="C:\PROGRA~1\LLVM\bin\clang-cl.exe" ALM_CXX="C:\PROGRA~1\LLVM\bin\clang- cl.exe" --verbose=1
By default, the static (libalm-static.lib) and dynamic (libalm.dll and libalm.lib) libraries are compiled and generated in the following location:
aocl-libm-ose/build/aocl-release/src/
If a debug mode build has been selected, the libraries will instead be compiled and generated in the following location:
aocl-libm-ose/build/aocl-debug/src