Skip to content

Commit

Permalink
SWDEV-466543 - Set BUILD_SHARED_LIBS flag in build_openmp script (#960)
Browse files Browse the repository at this point in the history
* SWDEV-466543 - Set BUILD_SHARED_LIBS flag in build_openmp script

For static builds, linking to static libraries of drm and libdrm_amdgpu is required.
Based on BUILD_SHARED_LIBS flag, thunk will link to static or shared library versions of drm/libdrm_amdgpu libraries

* Limit the setting of BUILD_SHARED_LIBS to non aomp standalone build

Change-Id: I72dfca132743ab7fa01f3043d58c8bf313568d08
  • Loading branch information
raramakr authored and estewart08 committed Jun 28, 2024
1 parent 2c80d23 commit 35f697b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/build_openmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ COMMON_CMAKE_OPTS="$AOMP_SET_NINJA_GEN -DOPENMP_ENABLE_LIBOMPTARGET=1
-DLLVM_DIR=$LLVM_DIR"

if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
# For static package builds, set BUILD_SHARED_LIBS to OFF
if [ "$STATIC_PKG_DEPS" == "ON" ]; then
COMMON_CMAKE_OPTS="$COMMON_CMAKE_OPTS -DBUILD_SHARED_LIBS=OFF"
fi
COMMON_CMAKE_OPTS="$COMMON_CMAKE_OPTS
-DLLVM_MAIN_INCLUDE_DIR=$LLVM_PROJECT_ROOT/llvm/include
-DLIBOMPTARGET_LLVM_INCLUDE_DIRS=$LLVM_PROJECT_ROOT/llvm/include
Expand Down

0 comments on commit 35f697b

Please sign in to comment.