-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathdiff_driver.sh
More file actions
executable file
·44 lines (36 loc) · 1.44 KB
/
diff_driver.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#
#Copyright © Advanced Micro Devices, Inc., or its affiliates.
#
#SPDX-License-Identifier: MIT
#
# diff_driver.sh : show the diff between llvm driver code in trunk vs amd-staging
# This checks both llvm-project/clang/lib/Driver and llvm-project/clang/include/clang/Driver
# --- Start standard header to set AOMP environment variables ----
realpath=`realpath $0`
thisdir=`dirname $realpath`
. $thisdir/aomp_common_vars
# --- end standard header ----
_tmpdir="/tmp/$USER"
AOMP_REPOS=${AOMP_REPOS:-/work/$USER/git/aomp20.0}
REPO_UPSTREAM=${REPO_UPSTREAM:-$AOMP_REPOS/llvm-project.upstream}
REPO_DOWNSTREAM=${REPO_DOWNSTREAM:-$AOMP_REPOS/llvm-project}
if [ ! -d $REPO_UPSTREAM ] ; then
echo "ERROR: dir $REPO_UPSTREAM not found. Set REPO_UPSTREAM to location of upstream llvm-project"
exit 1
fi
if [ ! -d $REPO_DOWNSTREAM ] ; then
echo "ERROR: dir $REPO_DOWNSTREAM not found. Set REPO_DOWNSTREAM to location of llvm-project with amd-staging branch"
exit 1
fi
dir_include="/clang/include/clang/Driver"
dir_code="/clang/lib/Driver"
mkdir -p $_tmpdir
diff -aur $REPO_UPSTREAM/$dir_include $REPO_DOWNSTREAM/$dir_include >$_tmpdir/driver_include.diff
diff -aur $REPO_UPSTREAM/$dir_code $REPO_DOWNSTREAM/$dir_code >$_tmpdir/driver_code.diff
echo see $_tmpdir/driver_include.diff
echo see $_tmpdir/driver_code.diff
echo wc $_tmpdir/driver_include.diff
wc $_tmpdir/driver_include.diff
echo wc $_tmpdir/driver_code.diff
wc $_tmpdir/driver_code.diff