From 00f8d65c36bab4199ca006ded2a0fa055f39f6a9 Mon Sep 17 00:00:00 2001 From: John Cater Date: Thu, 1 Aug 2019 14:21:54 -0700 Subject: [PATCH] Convert the bootstrap system to using improved host platform detection. Part of #6849. Closes #9051. PiperOrigin-RevId: 261196683 --- compile.sh | 8 ++++---- scripts/bootstrap/compile.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) 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" \