diff --git a/.gitignore b/.gitignore index b998082598bffe..6e54933d617f52 100644 --- a/.gitignore +++ b/.gitignore @@ -21,10 +21,6 @@ /base_workspace/src /bazel.iml /tools/jdk/jdk -/tools/jdk/ijar -/tools/jdk/JavaBuilder_deploy.jar -/tools/jdk/GenClass_deploy.jar -/tools/jdk/SingleJar_deploy.jar /tools/objc/*.jar /tools/objc/actoolwrapper.sh /tools/objc/ibtoolwrapper.sh diff --git a/compile.sh b/compile.sh index 7352c767ca47e6..58103488d4fb4e 100755 --- a/compile.sh +++ b/compile.sh @@ -90,14 +90,6 @@ fi source scripts/bootstrap/bootstrap.sh if [ $DO_TOOLS_COMPILATION ]; then - new_step 'Building Bazel tools' - bazel_bootstrap //third_party/ijar:ijar tools/jdk/ijar 0755 - bazel_bootstrap //src/java_tools/singlejar:SingleJar_deploy.jar \ - tools/jdk/SingleJar_deploy.jar - bazel_bootstrap //src/java_tools/buildjar:JavaBuilder_deploy.jar \ - tools/jdk/JavaBuilder_deploy.jar - bazel_bootstrap //src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass:GenClass_deploy.jar \ - tools/jdk/GenClass_deploy.jar if [[ $PLATFORM == "darwin" ]]; then bazel_bootstrap //src/tools/xcode/actoolwrapper:actoolwrapper tools/objc/actoolwrapper.sh 0755 bazel_bootstrap //src/tools/xcode/ibtoolwrapper:ibtoolwrapper tools/objc/ibtoolwrapper.sh 0755 diff --git a/src/BUILD b/src/BUILD index d1df1efdfde70b..0436ea6f63ab5f 100644 --- a/src/BUILD +++ b/src/BUILD @@ -78,6 +78,10 @@ genrule( "//src/tools/android/java/com/google/devtools/build/android/incrementaldeployment:srcs", "//src/tools/android/java/com/google/devtools/build/android/ziputils:embedded_tools", "//src/main/protobuf:srcs", + "//src/java_tools/buildjar:JavaBuilder_deploy.jar", + "//src/java_tools/singlejar:SingleJar_deploy.jar", + "//src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass:GenClass_deploy.jar", + "//third_party/ijar", ], outs = ["embedded_tools.zip"], cmd = "$(location :create_embedded_tools.sh) $@ $(SRCS)", diff --git a/src/create_embedded_tools.sh b/src/create_embedded_tools.sh index 2abd269a54e383..742b2ecf8da8a6 100755 --- a/src/create_embedded_tools.sh +++ b/src/create_embedded_tools.sh @@ -27,7 +27,14 @@ mkdir -p "${PACKAGE_DIR}" trap "rm -fr \"${PACKAGE_DIR}\"" EXIT for i in $*; do - OUTPUT_PATH=$(echo $i | sed 's_^.*bazel-out/[^/]*/bin/__') + case "$i" in + *JavaBuilder_deploy.jar) OUTPUT_PATH=tools/jdk/JavaBuilder_deploy.jar ;; + *SingleJar_deploy.jar) OUTPUT_PATH=tools/jdk/SingleJar_deploy.jar ;; + *GenClass_deploy.jar) OUTPUT_PATH=tools/jdk/GenClass_deploy.jar ;; + *ijar) OUTPUT_PATH=tools/jdk/ijar ;; + *) OUTPUT_PATH=$(echo $i | sed 's_^.*bazel-out/[^/]*/bin/__') ;; + esac + mkdir -p "${PACKAGE_DIR}/$(dirname "${OUTPUT_PATH}")" cp "$i" "${PACKAGE_DIR}/${OUTPUT_PATH}" done diff --git a/tools/jdk/BUILD b/tools/jdk/BUILD index b8f04197eb3b60..75edee657c51f2 100644 --- a/tools/jdk/BUILD +++ b/tools/jdk/BUILD @@ -94,13 +94,6 @@ java_toolchain( target_version = "8", ) -exports_files([ - "JavaBuilder_deploy.jar", - "ijar", - "SingleJar_deploy.jar", - "GenClass_deploy.jar", -]) - filegroup( name = "srcs", srcs = [