Bug 1361256 part 2 - Avoid mozconfig failures when clang-cl has't been downloaded yet. r?glandium draft
authorTing-Yu Chou <janus926@gmail.com>
Mon, 15 May 2017 11:38:41 +0800
changeset 593182 2205f70f95b5c20377c227d59d767af97951ce93
parent 593170 b44b5b8e4bed772b82b57c3e14788841619dcb24
child 633044 1f0178f0f37ab2f87c2ebc961694c5fcdc33e0f0
push id63622
push userbmo:janus926@gmail.com
push dateTue, 13 Jun 2017 09:09:41 +0000
reviewersglandium
bugs1361256
milestone55.0a1
Bug 1361256 part 2 - Avoid mozconfig failures when clang-cl has't been downloaded yet. r?glandium The `cd $PATH && pwd` pattern no longer works because tooltool packages haven't been downloaded yet when mach evaluates mozconfigs, check the directory existence beforehand. MozReview-Commit-ID: 68Axh1RWYUr
build/win64/mozconfig.asan
--- a/build/win64/mozconfig.asan
+++ b/build/win64/mozconfig.asan
@@ -1,19 +1,21 @@
 ac_add_options --target=x86_64-pc-mingw32
 ac_add_options --host=x86_64-pc-mingw32
 
-CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
+if [ -d "$topsrcdir/clang" ]; then
+    CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
 
-export LIB=$LIB:$CLANG_LIB_DIR
-mk_export_correct_style LIB
-export LDFLAGS="clang_rt.asan_dynamic-x86_64.lib clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
+    export LIB=$LIB:$CLANG_LIB_DIR
+    mk_export_correct_style LIB
+    export LDFLAGS="clang_rt.asan_dynamic-x86_64.lib clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
 
-export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer.exe"
-export MOZ_CLANG_RT_ASAN_LIB_PATH="${CLANG_LIB_DIR}/clang_rt.asan_dynamic-x86_64.dll"
+    export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer.exe"
+    export MOZ_CLANG_RT_ASAN_LIB_PATH="${CLANG_LIB_DIR}/clang_rt.asan_dynamic-x86_64.dll"
+fi
 
 # Enable ASan specific code and build workarounds
 ac_add_options --enable-address-sanitizer
 
 # Mandatory options required for ASan builds
 ac_add_options --enable-debug-symbols
 ac_add_options --disable-install-strip
 ac_add_options --disable-jemalloc