Ensure consistent build configuration

This change stops removing the out/soong/dexpreopt.config file and the
DexpreoptGlobalConfig entry in the out/soong/soong.variables file as
doing so leads the Soong being passed inconsistent configuration, where
the Config.productVariables.BootJars (and UpdatableBootJars) contains a
full list of boot jars but the corresponding fields in the
dexpreopt.GlobalConfig are empty.

Bug: 186195980
Test: DIST_DIR=out/bionic-dist ./art/tools/dist_linux_bionic.sh -j80 com.android.art.host com.android.support.apexer --skip-soong-tests
Change-Id: I1e34268a596565a2db173b6c26021ef2d618c0a7
diff --git a/tools/build_linux_bionic.sh b/tools/build_linux_bionic.sh
index c975f3e..ad7e7bd 100755
--- a/tools/build_linux_bionic.sh
+++ b/tools/build_linux_bionic.sh
@@ -63,7 +63,7 @@
 cat $out_dir/soong/soong.variables > ${tmp_soong_var}
 
 # See comment above about b/123645297 for why we cannot just do m clean. Clear
-# out all files except for intermediates and installed files.
+# out all files except for intermediates and installed files and dexpreopt.config.
 find $out_dir/ -maxdepth 1 -mindepth 1 \
                -not -name soong        \
                -not -name host         \
@@ -71,6 +71,7 @@
 find $out_dir/soong/ -maxdepth 1 -mindepth 1   \
                      -not -name .intermediates \
                      -not -name host           \
+                     -not -name dexpreopt.config \
                      -not -name target | xargs -I '{}' rm -rf '{}'
 
 python3 <<END - ${tmp_soong_var} ${out_dir}/soong/soong.variables
@@ -83,8 +84,6 @@
 x['CrossHostArch'] = 'x86_64'
 if 'CrossHostSecondaryArch' in x:
   del x['CrossHostSecondaryArch']
-if 'DexpreoptGlobalConfig' in x:
-  del x['DexpreoptGlobalConfig']
 json.dump(x, open(sys.argv[2], mode='w'))
 END