diff options
author | 2016-01-15 13:18:11 +0000 | |
---|---|---|
committer | 2016-01-15 14:45:24 +0000 | |
commit | 12c68aa5bfebd827bba8dc094546e4f516438096 (patch) | |
tree | 3136f30e248ea0138cb3917bf59b7328c1714857 /scripts | |
parent | 0a7a3d2aff20df4e3bffd3f8d5564cfd3cfc2a2b (diff) |
Do not include bazel_tools in the bootstrap binary
Instead use the current tools from the repository. This
simplifies the bootstrap binary and is a step towards
no C++ compilation for the bootstrap binary.
--
MOS_MIGRATED_REVID=112240524
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bootstrap/compile.sh | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index d023da7ce7..ec9739777f 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -296,6 +296,10 @@ if [ -z "${BAZEL_SKIP_JAVA_COMPILATION}" ]; then cp src/main/java/$i ${OUTPUT_DIR}/classes/$i 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 + create_deploy_jar "libblaze" "com.google.devtools.build.lib.bazel.BazelMain" \ ${OUTPUT_DIR} fi @@ -355,39 +359,6 @@ for i in libblaze.jar ${JNILIB} build-runfiles${EXE_EXT} process-wrapper${EXE_EX cp $OUTPUT_DIR/$i $ARCHIVE_DIR/$i; done -# Build a crude embedded tools directory for the bootstrapped binary. -# We simple shovel all of third_party and the tools directory into it. It's an -# over-approximation, but that's fine, because the bootstrap binary is only used -# for, well, bootstrapping and is never distributed anywhere. -EMBEDDED_TOOLS="" -for TOOL_DIR in third_party tools src/tools/android/java/com/google/devtools/build/android \ - src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper \ - src/main/protobuf src/main/java/com/google/devtools/common/options; do - EMBEDDED_TOOLS="${EMBEDDED_TOOLS} "$(find ${TOOL_DIR} -type f) -done - -for TOOL in ${EMBEDDED_TOOLS}; do - mkdir -p $(dirname ${ARCHIVE_DIR}/embedded_tools/${TOOL}); - cp ${TOOL} ${ARCHIVE_DIR}/embedded_tools/${TOOL} -done - -touch ${ARCHIVE_DIR}/embedded_tools/WORKSPACE - -mkdir -p ${ARCHIVE_DIR}/embedded_tools/src/main/java -cat > ${ARCHIVE_DIR}/embedded_tools/src/main/java/BUILD <<EOF -java_library( - name = "options", - srcs = glob([ - "com/google/devtools/common/options/*.java", - ]), - visibility = ["//visibility:public"], - deps = [ - "//third_party:guava", - "//third_party:jsr305", - ], -) -EOF - cp ${OUTPUT_DIR}/client ${ARCHIVE_DIR} cp ${OUTPUT_DIR}/libblaze.jar ${ARCHIVE_DIR}/A-server.jar |