62
62
echo " Checking that the gcc ABI is what we expect"
63
63
if [[ " $( uname) " != ' Darwin' ]]; then
64
64
function is_expected() {
65
- if [[ " $DESIRED_DEVTOOLSET " == * " cxx11-abi " * ]]; then
66
- if [[ " $1 " -gt 0 || " $1 " == " ON " ]]; then
65
+ if [[ " $DESIRED_DEVTOOLSET " == * libtorch * devtoolset7 * ]]; then
66
+ if [[ -z " $1 " || " $1 " == 0 || " $1 " == " OFF " ]]; then
67
67
echo 1
68
68
fi
69
69
else
70
- if [[ -z " $1 " || " $1 " == 0 || " $1 " == " OFF " ]]; then
70
+ if [[ " $1 " -gt 0 || " $1 " == " ON " ]]; then
71
71
echo 1
72
72
fi
73
73
fi
@@ -143,21 +143,7 @@ if [[ "$(uname)" != 'Darwin' ]]; then
143
143
check_lib_symbols_for_abi_correctness () {
144
144
lib=$1
145
145
echo " lib: " $lib
146
- if [[ " $DESIRED_DEVTOOLSET " == * " cxx11-abi" * ]]; then
147
- num_pre_cxx11_symbols=$( grep_symbols " ${PRE_CXX11_SYMBOLS[@]} " | wc -l) || true
148
- echo " num_pre_cxx11_symbols: " $num_pre_cxx11_symbols
149
- if [[ " $num_pre_cxx11_symbols " -gt 0 ]]; then
150
- echo " Found pre-cxx11 symbols but there shouldn't be. Dumping symbols"
151
- grep_symbols " ${PRE_CXX11_SYMBOLS[@]} "
152
- exit 1
153
- fi
154
- num_cxx11_symbols=$( grep_symbols " ${CXX11_SYMBOLS[@]} " | wc -l) || true
155
- echo " num_cxx11_symbols: " $num_cxx11_symbols
156
- if [[ " $num_cxx11_symbols " -lt 1000 ]]; then
157
- echo " Didn't find enough cxx11 symbols. Aborting."
158
- exit 1
159
- fi
160
- else
146
+ if [[ " $DESIRED_DEVTOOLSET " == * " libtorch*devtoolset7" * ]]; then
161
147
num_cxx11_symbols=$( grep_symbols " ${CXX11_SYMBOLS[@]} " | wc -l) || true
162
148
echo " num_cxx11_symbols: " $num_cxx11_symbols
163
149
if [[ " $num_cxx11_symbols " -gt 0 ]]; then
@@ -171,6 +157,20 @@ if [[ "$(uname)" != 'Darwin' ]]; then
171
157
echo " Didn't find enough pre-cxx11 symbols. Aborting."
172
158
exit 1
173
159
fi
160
+ else
161
+ num_pre_cxx11_symbols=$( grep_symbols " ${PRE_CXX11_SYMBOLS[@]} " | wc -l) || true
162
+ echo " num_pre_cxx11_symbols: " $num_pre_cxx11_symbols
163
+ if [[ " $num_pre_cxx11_symbols " -gt 0 ]]; then
164
+ echo " Found pre-cxx11 symbols but there shouldn't be. Dumping symbols"
165
+ grep_symbols " ${PRE_CXX11_SYMBOLS[@]} "
166
+ exit 1
167
+ fi
168
+ num_cxx11_symbols=$( grep_symbols " ${CXX11_SYMBOLS[@]} " | wc -l) || true
169
+ echo " num_cxx11_symbols: " $num_cxx11_symbols
170
+ if [[ " $num_cxx11_symbols " -lt 1000 ]]; then
171
+ echo " Didn't find enough cxx11 symbols. Aborting."
172
+ exit 1
173
+ fi
174
174
fi
175
175
}
176
176
# After https://github.com/pytorch/pytorch/pull/29731 most of the real
0 commit comments