try -B

Change-Id: I4e03d668197d76feb71113f47bae24fdd2fc6b6f
Reviewed-on: https://skia-review.googlesource.com/13334
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index 8f07210..ab8a39e 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -44,8 +44,9 @@
     if compiler == 'Clang' and os == 'Ubuntu':
       cc  = clang_linux + '/bin/clang'
       cxx = clang_linux + '/bin/clang++'
-      if 'MSAN' not in extra_config:
-        extra_ldflags.append('-fuse-ld=lld')
+      extra_cflags .append('-B%s/bin' % clang_linux)
+      extra_ldflags.append('-B%s/bin' % clang_linux)
+      extra_ldflags.append('-fuse-ld=lld')
     elif compiler == 'Clang':
       cc, cxx = 'clang', 'clang++'
     elif compiler == 'GCC':
diff --git a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json
index 18fcf484..8efd793 100644
--- a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json
+++ b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-ASAN.json
@@ -99,7 +99,7 @@
       "[CUSTOM_/_B_WORK]/skia/bin/gn",
       "gen",
       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-ASAN/Debug",
-      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-fuse-ld=lld\"] sanitize=\"ASAN\" skia_enable_spirv_validation=false target_cpu=\"x86_64\""
+      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\"] sanitize=\"ASAN\" skia_enable_spirv_validation=false target_cpu=\"x86_64\""
     ],
     "cwd": "[CUSTOM_/_B_WORK]/skia",
     "env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-MSAN.json b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-MSAN.json
index 7c53a54..09e118b 100644
--- a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-MSAN.json
+++ b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug-MSAN.json
@@ -99,7 +99,7 @@
       "[CUSTOM_/_B_WORK]/skia/bin/gn",
       "gen",
       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug-MSAN/Debug",
-      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-L[START_DIR]/clang_linux/msan\"] sanitize=\"MSAN\" skia_use_fontconfig=false target_cpu=\"x86_64\""
+      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/msan\"] sanitize=\"MSAN\" skia_use_fontconfig=false target_cpu=\"x86_64\""
     ],
     "cwd": "[CUSTOM_/_B_WORK]/skia",
     "env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug.json b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug.json
index 80513b7..dfba52f 100644
--- a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug.json
+++ b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Debug.json
@@ -99,7 +99,7 @@
       "[CUSTOM_/_B_WORK]/skia/bin/gn",
       "gen",
       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Debug/Debug",
-      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-O1\"] extra_ldflags=[\"-fuse-ld=lld\"] target_cpu=\"x86_64\""
+      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-O1\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\"] target_cpu=\"x86_64\""
     ],
     "cwd": "[CUSTOM_/_B_WORK]/skia",
     "env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Mini.json b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Mini.json
index 28e0533..a48a946 100644
--- a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Mini.json
+++ b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Mini.json
@@ -99,7 +99,7 @@
       "[CUSTOM_/_B_WORK]/skia/bin/gn",
       "gen",
       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Release-Mini/Release",
-      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_ldflags=[\"-fuse-ld=lld\"] is_component_build=true is_debug=false is_official_build=true skia_enable_effects=false skia_enable_gpu=false skia_enable_pdf=false skia_use_expat=false skia_use_libjpeg_turbo=false skia_use_libpng=false skia_use_libwebp=false skia_use_zlib=false target_cpu=\"x86_64\""
+      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\"] is_component_build=true is_debug=false is_official_build=true skia_enable_effects=false skia_enable_gpu=false skia_enable_pdf=false skia_use_expat=false skia_use_libjpeg_turbo=false skia_use_libpng=false skia_use_libwebp=false skia_use_zlib=false target_cpu=\"x86_64\""
     ],
     "cwd": "[CUSTOM_/_B_WORK]/skia",
     "env": {
diff --git a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json
index 3d05730..3864089 100644
--- a/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipes/compile.expected/Build-Ubuntu-Clang-x86_64-Release-Vulkan.json
@@ -99,7 +99,7 @@
       "[CUSTOM_/_B_WORK]/skia/bin/gn",
       "gen",
       "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-Clang-x86_64-Release-Vulkan/Release",
-      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_ldflags=[\"-fuse-ld=lld\"] is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/linux_vulkan_sdk\" target_cpu=\"x86_64\""
+      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\"] is_debug=false skia_enable_vulkan_debug_layers=false skia_vulkan_sdk=\"[START_DIR]/linux_vulkan_sdk\" target_cpu=\"x86_64\""
     ],
     "cwd": "[CUSTOM_/_B_WORK]/skia",
     "env": {