Skip to content

Commit e84ce44

Browse files
committedFeb 6, 2024
[build] - Remove usage of DEVEL/RUN_PACKAGE.
This patch will allow us to use a new package method that does not require these cmake variables and subsequently we can clean up the openmp CMakeLists.txt. openmp-extras will now install into /opt/rocm/lib/llvm instead of a separate openmp-extras directory. Removed the install/local in flang, flang-runtime, and pgmath as that was overwriting the install_manifest.txt with only a subset of files. build_aomp.sh will loop over each component's install_manifest.txt and concatenate the files to installed_files.txt for packaging. Change-Id: I3902ce481d6e459229495d09a01915e18a5f04c6
1 parent 9dc975c commit e84ce44

7 files changed

+33
-51
lines changed
 

‎bin/build_aomp.sh

+27
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,33 @@ echo
195195
date
196196
echo " ================= END build_aomp.sh ==================="
197197
echo
198+
if [ "$AOMP_STANDALONE_BUILD" -eq 0 ]; then
199+
cd $BUILD_DIR/build
200+
legacy_version=`ls flang-legacy`
201+
legacy_install_manifest=$legacy_version/install_manifest.txt
202+
if [ "$SANITIZER" == 1 ]; then
203+
install_manifest_orig=asan/install_manifest.txt
204+
else
205+
install_manifest_orig=install_manifest.txt
206+
fi
207+
208+
# Clean file log
209+
rm -f $BUILD_DIR/build/installed_files.txt
210+
211+
for directory in ./*/; do
212+
pushd $directory > /dev/null
213+
if [[ "$directory" =~ "flang-legacy" ]]; then
214+
install_manifest=$legacy_install_manifest
215+
else
216+
install_manifest=$install_manifest_orig
217+
fi
218+
if [ -f "$install_manifest" ]; then
219+
cat $install_manifest >> $BUILD_DIR/build/installed_files.txt
220+
echo "" >> $BUILD_DIR/build/installed_files.txt
221+
fi
222+
popd > /dev/null
223+
done
224+
fi
198225

199226
echo "ls $INSTALL_PREFIX/openmp-extras:"
200227
ls $INSTALL_PREFIX/openmp-extras

‎bin/build_extras.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
126126
-DCMAKE_INSTALL_PREFIX=$INSTALL_EXTRAS \
127127
-DCMAKE_PREFIX_PATH=$DEVICELIBS_BUILD_PATH;$OUT_DIR/build/devicelibs \
128128
-DAOMP_VERSION_STRING=$ROCM_VERSION \
129-
-DENABLE_DEVEL_PACKAGE=ON"
129+
"
130130
fi
131131

132132
mkdir -p $BUILD_DIR/build/extras

‎bin/build_flang-legacy.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $AOMP_ORIGIN_RPATH"
8181

8282
if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
8383
MYCMAKEOPTS="$MYCMAKEOPTS
84-
-DENABLE_DEVEL_PACKAGE=ON -DENABLE_RUN_PACKAGE=ON"
84+
"
8585
fi
8686

8787
if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then

‎bin/build_flang.sh

+2-11
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
6262

6363
if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
6464
MYCMAKEOPTS="$MYCMAKEOPTS $OPENMP_EXTRAS_ORIGIN_RPATH
65-
-DENABLE_DEVEL_PACKAGE=ON -DENABLE_RUN_PACKAGE=ON"
65+
"
6666
fi
6767

6868
if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
@@ -197,11 +197,6 @@ if [ "$1" == "install" ] ; then
197197
echo "ERROR make install failed "
198198
exit 1
199199
fi
200-
$SUDO make install/local
201-
if [ $? != 0 ] ; then
202-
echo "ERROR make install/local failed "
203-
exit 1
204-
fi
205200
echo "SUCCESSFUL INSTALL to $INSTALL_FLANG "
206201
fi
207202
echo
@@ -212,11 +207,6 @@ if [ "$1" == "install" ] ; then
212207
echo "ERROR make install failed "
213208
exit 1
214209
fi
215-
$SUDO make install/local
216-
if [ $? != 0 ] ; then
217-
echo "ERROR make install/local failed "
218-
exit 1
219-
fi
220210
fi
221211
echo "SUCCESSFUL INSTALL to $INSTALL_FLANG/lib/asan "
222212
echo
@@ -231,6 +221,7 @@ if [ "$1" == "install" ] ; then
231221
echo "Copy flang, flang1, flang2 into $INSTALL_PREFIX/llvm/bin"
232222
cp $INSTALL_PREFIX/openmp-extras/bin/flang1 $INSTALL_PREFIX/llvm/bin
233223
cp $INSTALL_PREFIX/openmp-extras/bin/flang2 $INSTALL_PREFIX/llvm/bin
224+
cp $INSTALL_PREFIX/openmp-extras/bin/flang-legacy $INSTALL_PREFIX/llvm/bin
234225
fi
235226
else
236227
echo

‎bin/build_flang_runtime.sh

-11
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ MYCMAKEOPTS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
7676

7777
if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
7878
MYCMAKEOPTS="$MYCMAKEOPTS $OPENMP_EXTRAS_ORIGIN_RPATH
79-
-DENABLE_DEVEL_PACKAGE=ON -DENABLE_RUN_PACKAGE=ON
8079
-DOPENMP_EXTRAS_SHARED_LINKER_FLAGS=$OPENMP_EXTRAS_SHARED_LINKER_FLAGS"
8180
fi
8281

@@ -220,11 +219,6 @@ if [ "$1" == "install" ] ; then
220219
echo "ERROR make install failed "
221220
exit 1
222221
fi
223-
$SUDO make install/local
224-
if [ $? != 0 ] ; then
225-
echo "ERROR make install/local failed "
226-
exit 1
227-
fi
228222
echo "SUCCESSFUL INSTALL to $INSTALL_FLANG "
229223
fi
230224
echo
@@ -237,11 +231,6 @@ if [ "$1" == "install" ] ; then
237231
echo "ERROR make install failed "
238232
exit 1
239233
fi
240-
$SUDO make install/local
241-
if [ $? != 0 ] ; then
242-
echo "ERROR make install/local failed "
243-
exit 1
244-
fi
245234
echo "SUCCESSFUL INSTALL to $INSTALL_FLANG/lib/asan "
246235
fi
247236
echo

‎bin/build_openmp.sh

+1-16
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ COMMON_CMAKE_OPTS="-DDEVICELIBS_ROOT=$DEVICELIBS_ROOT
101101
-DOPENMP_TEST_CXX_COMPILER=$INSTALL_PREFIX/llvm/bin/clang++"
102102

103103
if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
104-
COMMON_CMAKE_OPTS="$COMMON_CMAKE_OPTS -DENABLE_DEVEL_PACKAGE=ON -DENABLE_RUN_PACKAGE=ON $OPENMP_EXTRAS_ORIGIN_RPATH"
104+
COMMON_CMAKE_OPTS="$COMMON_CMAKE_OPTS $OPENMP_EXTRAS_ORIGIN_RPATH"
105105
fi
106106

107107
if [[ "$ROCM_DIR" =~ "/opt/rocm" ]]; then
@@ -419,21 +419,6 @@ if [ "$1" == "install" ] ; then
419419
fi
420420
fi
421421

422-
if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
423-
cd $BUILD_DIR/build/openmp_debug/asan
424-
echo
425-
echo " ----- Installing to $INSTALL_OPENMP/lib-debug/asan ------ "
426-
$SUDO make -j $NUM_THREADS install
427-
if [ $? != 0 ]; then
428-
echo "ERROR make install failed for openmp_debug/asan"
429-
exit 1
430-
fi
431-
fi
432-
if [[ "$DEVEL_PACKAGE" =~ "devel" ]]; then
433-
AOMP_INSTALL_DIR="$AOMP_INSTALL_DIR/""$DEVEL_PACKAGE"
434-
echo "Request for devel package found."
435-
fi
436-
437422
# Copy selected debugable runtime sources into the installation lib-debug/src directory
438423
# to satisfy the above -fdebug-prefix-map.
439424
$SUDO mkdir -p $AOMP_INSTALL_DIR/lib-debug/src/openmp/runtime/src

‎bin/build_pgmath.sh

+1-11
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fi
5959

6060
if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
6161
MYCMAKEOPTS="$MYCMAKEOPTS
62-
-DENABLE_DEVEL_PACKAGE=ON -DENABLE_RUN_PACKAGE=ON"
62+
"
6363
fi
6464

6565
if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
@@ -199,11 +199,6 @@ if [ "$1" == "install" ] ; then
199199
echo "ERROR make install failed "
200200
exit 1
201201
fi
202-
$SUDO make install/local
203-
if [ $? != 0 ] ; then
204-
echo "ERROR make install/local failed "
205-
exit 1
206-
fi
207202
echo "SUCCESSFUL INSTALL to $INSTALL_FLANG "
208203
fi
209204
echo
@@ -215,11 +210,6 @@ if [ "$1" == "install" ] ; then
215210
echo "ERROR make install failed "
216211
exit 1
217212
fi
218-
$SUDO make install/local
219-
if [ $? != 0 ]; then
220-
echo "ERROR make install/local failed "
221-
exit 1
222-
fi
223213
fi
224214
echo "SUCCESSFUL INSTALL to $INSTALL_FLANG/lib/asan "
225215
echo

0 commit comments

Comments
 (0)
Please sign in to comment.