diff --git a/compile.sh b/compile.sh index a53dc834ea8a86..d91583d277cba8 100755 --- a/compile.sh +++ b/compile.sh @@ -61,12 +61,12 @@ source scripts/bootstrap/bootstrap.sh new_step 'Building Bazel with Bazel' display "." log "Building output/bazel" -# We set host and target platform directly since the defaults in @bazel_tools -# have not yet been generated. +# We set host and target platform directly because we are building for the local +# host. bazel_build "src:bazel_nojdk${EXE_EXT}" \ --action_env=PATH \ - --host_platform=@bazel_tools//platforms:host_platform \ - --platforms=@bazel_tools//platforms:target_platform \ + --host_platform=@local_config_platform//:host \ + --platforms=@local_config_platform//:host \ || fail "Could not build Bazel" bazel_bin_path="$(get_bazel_bin_path)/src/bazel_nojdk${EXE_EXT}" [ -e "$bazel_bin_path" ] \ diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index 6434f48b89b461..06a98546cc7e32 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -301,6 +301,7 @@ EOF cat <${OUTPUT_DIR}/classes/com/google/devtools/build/lib/bazel/rules/tools.WORKSPACE local_repository(name = 'bazel_tools', path = '${BAZEL_TOOLS_REPO}') bind(name = "cc_toolchain", actual = "@bazel_tools//tools/cpp:default-toolchain") +local_config_platform(name = 'local_config_platform') EOF create_deploy_jar "libblaze" "com.google.devtools.build.lib.bazel.Bazel" \