Use bind to redirect C++ crosstool configuration
This is a temporary workaround to enable the use
of a cc_configure() rules to auto-configure C++ toolchain.
--
MOS_MIGRATED_REVID=116140726
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index e585719..b7a5f3f 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -169,8 +169,10 @@
done
# Overwrite tools.WORKSPACE, this is only for the bootstrap binary
- echo "local_repository(name = 'bazel_tools', path = __workspace_dir__)" \
- > ${OUTPUT_DIR}/classes/com/google/devtools/build/lib/bazel/rules/tools.WORKSPACE
+ cat <<EOF >${OUTPUT_DIR}/classes/com/google/devtools/build/lib/bazel/rules/tools.WORKSPACE
+local_repository(name = 'bazel_tools', path = __workspace_dir__)
+bind(name = "cc_toolchain", actual = "@bazel_tools//tools/cpp:default-toolchain")
+EOF
create_deploy_jar "libblaze" "com.google.devtools.build.lib.bazel.BazelMain" \
${OUTPUT_DIR}