diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2016-03-04 16:09:33 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-03-04 16:16:53 +0000 |
commit | 12ecc0b9f0edbc997492fd872d027e7b2b778634 (patch) | |
tree | ac8c8c9fe795db363c744ba4b08c21bc14c7d39e /tools | |
parent | 16c33c3a8cb0d55a6f0f24806add771f324952ce (diff) |
cc_configure: fix various small errors
- Skylark does not allow implicit concatenation that was added by the linter
- osx_cc_wrapper renaming was not applied everywhere
- arm toolchain was missing in the toolchain_suite
Also fix the test to use the correct cc_configure.bzl file.
--
MOS_MIGRATED_REVID=116362768
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cpp/BUILD.tpl | 1 | ||||
-rw-r--r-- | tools/cpp/cc_configure.bzl | 8 | ||||
-rw-r--r-- | tools/cpp/test/BUILD | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/tools/cpp/BUILD.tpl b/tools/cpp/BUILD.tpl index 3079485099..f633425bfd 100644 --- a/tools/cpp/BUILD.tpl +++ b/tools/cpp/BUILD.tpl @@ -20,6 +20,7 @@ cc_toolchain_suite( name = "toolchain", toolchains = { "%{name}": ":cc-compiler-%{name}", + "armeabi-v7a": ":cc-compiler-armeabi-v7a", }, ) diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index 0f70247791..2780bddafa 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -84,7 +84,7 @@ def _ld_library_paths(ctx): def _get_cpu_value(ctx): """Compute the cpu_value based on the OS name.""" - return "darwin" if ctx.os.name.lower().startswith("mac os") else "local" + return "darwin" if ctx.os.name.lower().startswith("mac os") else "k8" _INC_DIR_MARKER_BEGIN = "#include <...> search starts here:" @@ -225,8 +225,8 @@ def _find_cc(ctx): cc = ctx.which("gcc") if cc == None: fail( - "Cannot find gcc, either correct your path or set the CC environment" - " variable") + "Cannot find gcc, either correct your path or set the CC" + + " ennvironment variable") return cc @@ -249,7 +249,7 @@ def _impl(ctx): "%{name}": cpu_value, "%{supports_param_files}": "0" if darwin else "1" }) - _tpl(ctx, "osx_gcc_wrapper.sh", {"%{cc}": str(cc)}) + _tpl(ctx, "osx_cc_wrapper.sh", {"%{cc}": str(cc)}) _tpl(ctx, "CROSSTOOL", { "%{cpu}": cpu_value, "%{content}": _build_crosstool(crosstool_content) + "\n" + diff --git a/tools/cpp/test/BUILD b/tools/cpp/test/BUILD index e1030223ad..f36e1edb78 100644 --- a/tools/cpp/test/BUILD +++ b/tools/cpp/test/BUILD @@ -45,7 +45,7 @@ genrule( outs = ["WORKSPACE"], cmd = """ cat <<EOF >$@ -load("//tools/cpp:cc_configure.bzl", "cc_configure") +load("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure") cc_configure() EOF cat $(location //:workspace-file) >>$@ |