cmake: Fix BUILD_SHARED_LIBS option and README for it

BUILD_SHARED_LIBS is a global flag so we don't need to set a default
option for it in both libhsakmt and hsa-runtime, only the top level
CMakeLists file. Also updated README to reflect that libhsakmt is
always built statically and gets linked to libhsa-runtime.

Change-Id: I1511f68a268032bec9758bc731d8074f33ec980f


[ROCm/ROCR-Runtime commit: ff01f62777]
This commit is contained in:
sonadeem
2025-01-28 17:47:06 -05:00
committed by Sohaib Nadeem
parent 75a060fc53
commit 02edf09f87
4 changed files with 8 additions and 14 deletions
+2 -2
View File
@@ -79,9 +79,9 @@ Ensure you have the following installed:
```
- *Control whether libhsakmt and libhsa-runtime are shared or static*
The default (when `BUILD_SHARED_LIBS` is unset) is for libhsakmt to be static and libhsa-runtime to be shared. Setting `BUILD_SHARED_LIBS` to `OFF` will make both static and setting it to `ON` will make them both shared.
libhsakmt is always built as a static library that gets linked into libhsa-runtime, so there is a single library generated called libhsa-runtime64{.so/.a}. If `BUILD_SHARED_LIBS` is not set, this is a shared library by default. Setting `BUILD_SHARED_LIBS` to `OFF` will make it static.
```sh
-DBUILD_SHARED_LIBS=OFF # or ON for both libs shared
-DBUILD_SHARED_LIBS=ON # or OFF for static lib
```
### Building the tests
#### rocrtst