diff options
author | Alessio Balsini <balsini@google.com> | 2019-08-01 20:04:12 +0000 |
---|---|---|
committer | Alessio Balsini <balsini@google.com> | 2019-08-01 20:04:12 +0000 |
commit | 280a192a14d4e8430d8b545c00ec09da9bcdd76e (patch) | |
tree | 5020568fdbec3454dcc0d656ccca76bcabc057f4 | |
parent | f9394cfcf59ef8d16ebcdef50e0fe4bc45bbf99c (diff) |
Revert "build.sh: Fix the behavior of specifying CC"
This reverts commit f9394cfcf59ef8d16ebcdef50e0fe4bc45bbf99c.
Reason for revert: some builds are failing, investigating offline (b/138799604)
Change-Id: Id866ef7e0a405d15930989526c22a1d23e89279a
-rwxr-xr-x | build.sh | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -152,10 +152,6 @@ SIGN_SEC=certs/signing_key.pem SIGN_CERT=certs/signing_key.x509 SIGN_ALGO=sha512 -# Save environment parameters before being overwritten by sourcing -# BUILD_CONFIG. -CC_ARG=$CC - source "${ROOT_DIR}/build/envsetup.sh" export MAKE_ARGS=$@ @@ -168,14 +164,10 @@ cd ${ROOT_DIR} export CLANG_TRIPLE CROSS_COMPILE CROSS_COMPILE_ARM32 ARCH SUBARCH -# Restore the previously saved CC argument that might have been overridden by -# the BUILD_CONFIG. -[ -n $CC_ARG ] && CC=$CC_ARG - # CC=gcc is effectively a fallback to the default gcc including any target -# triplets. An absolute path (e.g., CC=/usr/bin/gcc) must be specified to use a -# custom compiler. -[ "$CC" == "gcc" ] && unset CC && unset CC_ARG +# triplets. If the user wants to use a custom compiler, they are still able to +# pass an absolute path, e.g. CC=/usr/bin/gcc. +[ "${CC}" == "gcc" ] && unset CC if [ -n "${CC}" ]; then CC_ARG="CC=${CC} HOSTCC=${CC}" |