diff options
author | 2015-10-27 08:50:20 +0000 | |
---|---|---|
committer | 2015-10-27 11:51:17 +0000 | |
commit | dd8ca1a50078519440d19fba4c884ee8928c2e34 (patch) | |
tree | 2f247c74b27b8587183fb8f6210067c56e67f534 /scripts | |
parent | 317ebd534057f85950931784514377a103473afe (diff) |
compile.sh to take LDFLAGS for bootstrap
During bootstrap a number of tools are linked manually. These
link steps should take LDFLAGS to bootstrap bazel with custom
toolchain.
These tools are build-runfiles, process-wrapper and
namespace-sandbox.
cc_link() routine in compile.sh already takes LDFLAGS but not
the link steps for the tools listed above. They should all do so.
A developer can now do this to build Bazel:
CC="some-gcc" CXX="some-g++" LDFLAGS="-Lsome-glibc" \
JNI_LD_ARGS="-Lsome-glibc" ./compile.sh
--
Change-Id: Ifd1a03e989266a7fe3f1f92a7a44093b135fdc18
Reviewed-on: https://bazel-review.googlesource.com/2211
MOS_MIGRATED_REVID=106378256
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bootstrap/compile.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index 96345c7c41..4e5870a4b1 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -325,16 +325,16 @@ fi log "Compiling build-runfiles..." # Clang on Linux requires libstdc++ -run_silent "${CXX}" -o ${OUTPUT_DIR}/build-runfiles -std=c++0x src/main/tools/build-runfiles.cc -lstdc++ +run_silent "${CXX}" -o ${OUTPUT_DIR}/build-runfiles -std=c++0x src/main/tools/build-runfiles.cc -lstdc++ ${LDFLAGS} log "Compiling process-wrapper..." -run_silent "${CC}" -o ${OUTPUT_DIR}/process-wrapper -std=c99 src/main/tools/process-wrapper.c src/main/tools/process-tools.c -lm +run_silent "${CC}" -o ${OUTPUT_DIR}/process-wrapper -std=c99 src/main/tools/process-wrapper.c src/main/tools/process-tools.c -lm ${LDFLAGS} log "Compiling namespace-sandbox..." if [[ $PLATFORM == "linux" ]]; then - run_silent "${CC}" -o ${OUTPUT_DIR}/namespace-sandbox -std=c99 src/main/tools/namespace-sandbox.c src/main/tools/network-tools.c src/main/tools/process-tools.c -lm + run_silent "${CC}" -o ${OUTPUT_DIR}/namespace-sandbox -std=c99 src/main/tools/namespace-sandbox.c src/main/tools/network-tools.c src/main/tools/process-tools.c -lm ${LDFLAGS} else - run_silent "${CC}" -o ${OUTPUT_DIR}/namespace-sandbox -std=c99 src/main/tools/namespace-sandbox-dummy.c -lm + run_silent "${CC}" -o ${OUTPUT_DIR}/namespace-sandbox -std=c99 src/main/tools/namespace-sandbox-dummy.c -lm ${LDFLAGS} fi cp src/main/tools/build_interface_so ${OUTPUT_DIR}/build_interface_so |