Index: build_tools/nacl_env.sh |
diff --git a/build_tools/nacl_env.sh b/build_tools/nacl_env.sh |
index a8b099be51b6a2c690a8e6c8586714b98784ff13..295449688999211e2a97e95bfd231f51cbbe9839 100755 |
--- a/build_tools/nacl_env.sh |
+++ b/build_tools/nacl_env.sh |
@@ -148,7 +148,15 @@ InitializeNaClGccToolchain() { |
InitializePNaClToolchain() { |
- local TC_ROOT=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR}_x86_pnacl/${NACL_LIBC} |
+ local TC_ROOT=${NACL_SDK_ROOT}/toolchain |
+ # The PNaCl toolchain moved in pepper_30. Check for |
+ # the existence of the old folder first and use that |
+ # if found. |
+ if [ -d "${TC_ROOT}/${OS_SUBDIR}_x86_pnacl" ]; then |
+ TC_ROOT=${TC_ROOT}/${OS_SUBDIR}_x86_pnacl/${NACL_LIBC} |
+ else |
+ TC_ROOT=${TC_ROOT}/${OS_SUBDIR}_pnacl |
+ fi |
readonly NACL_TOOLCHAIN_ROOT=${NACL_TOOLCHAIN_ROOT:-${TC_ROOT}} |
readonly NACL_BIN_PATH=${NACL_TOOLCHAIN_ROOT}/bin |