Use the downloaded clang when building for armhf-debian
This makes it work on a barebones Stretch installation.
Also add building for this CPU to the CI script so we know it keeps
working, which means marking everything that's supposed to work
appropriately.
Change-Id: Ic050ce20eae45c6b23e0e42dddb24db3ebc70b84
diff --git a/third_party/eigen/BUILD b/third_party/eigen/BUILD
index 4a33fd9..8fe7fa6 100644
--- a/third_party/eigen/BUILD
+++ b/third_party/eigen/BUILD
@@ -1,22 +1,28 @@
-licenses(['notice'])
+licenses(["notice"])
load("//tools:environments.bzl", "mcu_cpus")
cc_library(
- name = 'eigen',
- visibility = ['//visibility:public'],
- srcs = glob(['Eigen/src/**/*.h']),
- includes = ['.'],
- hdrs = glob(['Eigen/*'], exclude=[
- # Stuff that we don't have the dependencies for.
- 'Eigen/CholmodSupport',
- 'Eigen/MetisSupport',
- 'Eigen/PaStiXSupport',
- 'Eigen/PardisoSupport',
- 'Eigen/SPQRSupport',
- 'Eigen/SuperLUSupport',
- 'Eigen/UmfPackSupport',
- ]) + ['unsupported/Eigen/MatrixFunctions'] +
- glob(['unsupported/Eigen/src/MatrixFunctions/*.h']),
- compatible_with = mcu_cpus,
+ name = "eigen",
+ srcs = glob(["Eigen/src/**/*.h"]),
+ hdrs = glob(
+ ["Eigen/*"],
+ exclude = [
+ # Stuff that we don't have the dependencies for.
+ "Eigen/CholmodSupport",
+ "Eigen/MetisSupport",
+ "Eigen/PaStiXSupport",
+ "Eigen/PardisoSupport",
+ "Eigen/SPQRSupport",
+ "Eigen/SuperLUSupport",
+ "Eigen/UmfPackSupport",
+ ],
+ ) + ["unsupported/Eigen/MatrixFunctions"] + glob([
+ "unsupported/Eigen/src/MatrixFunctions/*.h",
+ ]),
+ compatible_with = mcu_cpus + [
+ "//tools:armhf-debian",
+ ],
+ includes = ["."],
+ visibility = ["//visibility:public"],
)
diff --git a/third_party/googletest/BUILD b/third_party/googletest/BUILD
index c082b0c..b0a99a6 100644
--- a/third_party/googletest/BUILD
+++ b/third_party/googletest/BUILD
@@ -27,6 +27,9 @@
hdrs = glob([
"googletest/include/gtest/*.h",
]),
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
copts = [
"-g",
"-Wall",
@@ -71,6 +74,9 @@
hdrs = glob([
"googlemock/include/gmock/*.h",
]),
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
copts = [
"-std=c++11",
"-g",
diff --git a/third_party/libjpeg/BUILD b/third_party/libjpeg/BUILD
index a139773..469de52 100644
--- a/third_party/libjpeg/BUILD
+++ b/third_party/libjpeg/BUILD
@@ -1,69 +1,74 @@
-licenses(['notice'])
+licenses(["notice"])
cc_library(
- name = 'libjpeg',
- visibility = ['//visibility:public'],
- srcs = glob([
- 'jaricom.c',
- 'jcapimin.c',
- 'jcapistd.c',
- 'jcarith.c',
- 'jccoefct.c',
- 'jccolor.c',
- 'jcdctmgr.c',
- 'jchuff.c',
- 'jcinit.c',
- 'jcmainct.c',
- 'jcmarker.c',
- 'jcmaster.c',
- 'jcomapi.c',
- 'jcparam.c',
- 'jcprepct.c',
- 'jcsample.c',
- 'jctrans.c',
- 'jdapimin.c',
- 'jdapistd.c',
- 'jdarith.c',
- 'jdatadst.c',
- 'jdatasrc.c',
- 'jdcoefct.c',
- 'jdcolor.c',
- 'jddctmgr.c',
- 'jdhuff.c',
- 'jdinput.c',
- 'jdmainct.c',
- 'jdmarker.c',
- 'jdmaster.c',
- 'jdmerge.c',
- 'jdpostct.c',
- 'jdsample.c',
- 'jdtrans.c',
- 'jerror.c',
- 'jfdctflt.c',
- 'jfdctfst.c',
- 'jfdctint.c',
- 'jidctflt.c',
- 'jidctfst.c',
- 'jidctint.c',
- 'jquant1.c',
- 'jquant2.c',
- 'jutils.c',
- 'jmemmgr.c',
- 'jmemnobs.c',
- ]),
- hdrs = glob([
- '*.h',
- ], exclude=[
- 'jmemdos.h',
- 'jmemmac.h',
- ]),
- includes = ['src/main/c'],
- copts = [
- '-Wno-cast-align',
- '-Wno-cast-qual',
-
- '-Wno-switch-enum',
- '-Wno-format-nonliteral',
- '-Wno-unused-parameter',
- ],
+ name = "libjpeg",
+ srcs = glob([
+ "jaricom.c",
+ "jcapimin.c",
+ "jcapistd.c",
+ "jcarith.c",
+ "jccoefct.c",
+ "jccolor.c",
+ "jcdctmgr.c",
+ "jchuff.c",
+ "jcinit.c",
+ "jcmainct.c",
+ "jcmarker.c",
+ "jcmaster.c",
+ "jcomapi.c",
+ "jcparam.c",
+ "jcprepct.c",
+ "jcsample.c",
+ "jctrans.c",
+ "jdapimin.c",
+ "jdapistd.c",
+ "jdarith.c",
+ "jdatadst.c",
+ "jdatasrc.c",
+ "jdcoefct.c",
+ "jdcolor.c",
+ "jddctmgr.c",
+ "jdhuff.c",
+ "jdinput.c",
+ "jdmainct.c",
+ "jdmarker.c",
+ "jdmaster.c",
+ "jdmerge.c",
+ "jdpostct.c",
+ "jdsample.c",
+ "jdtrans.c",
+ "jerror.c",
+ "jfdctflt.c",
+ "jfdctfst.c",
+ "jfdctint.c",
+ "jidctflt.c",
+ "jidctfst.c",
+ "jidctint.c",
+ "jquant1.c",
+ "jquant2.c",
+ "jutils.c",
+ "jmemmgr.c",
+ "jmemnobs.c",
+ ]),
+ hdrs = glob(
+ [
+ "*.h",
+ ],
+ exclude = [
+ "jmemdos.h",
+ "jmemmac.h",
+ ],
+ ),
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ copts = [
+ "-Wno-cast-align",
+ "-Wno-cast-qual",
+ "-Wno-switch-enum",
+ "-Wno-format-nonliteral",
+ "-Wno-unused-parameter",
+ ],
+ includes = ["src/main/c"],
+ visibility = ["//visibility:public"],
)
diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD
index ddeeb77..5e9005b 100644
--- a/third_party/protobuf/BUILD
+++ b/third_party/protobuf/BUILD
@@ -71,6 +71,9 @@
"src/google/protobuf/wire_format_lite.cc",
],
hdrs = glob(["src/google/protobuf/**/*.h"]),
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
copts = COPTS,
includes = ["src/"],
linkopts = LINK_OPTS,
@@ -136,6 +139,9 @@
"src/google/protobuf/wrappers.pb.cc",
],
hdrs = glob(["src/**/*.h"]),
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
copts = COPTS,
includes = ["src/"],
linkopts = LINK_OPTS,
@@ -143,7 +149,7 @@
deps = [":protobuf_lite"],
)
-'''
+"""
objc_library(
name = "protobuf_objc",
hdrs = ["objectivec/GPBProtocolBuffers.h"],
@@ -151,7 +157,7 @@
non_arc_srcs = ["objectivec/GPBProtocolBuffers.m"],
visibility = ["//visibility:public"],
)
-'''
+"""
RELATIVE_WELL_KNOWN_PROTOS = [
# AUTOGEN(well_known_protos)
@@ -363,10 +369,10 @@
name = "cc_test_protos",
srcs = LITE_TEST_PROTOS + TEST_PROTOS,
include = "src",
+ copts = COPTS,
default_runtime = ":protobuf",
protoc = ":protoc",
deps = [":cc_wkt_protos"],
- copts = COPTS,
)
COMMON_TEST_SRCS = [
@@ -386,12 +392,12 @@
"src/google/protobuf/compiler/test_plugin.cc",
"src/google/protobuf/testing/file.cc",
],
+ copts = COPTS,
deps = [
":protobuf",
":protoc_lib",
"//external:gtest",
],
- copts = COPTS,
)
cc_test(
@@ -488,11 +494,11 @@
name = "gen_well_known_protos_java",
srcs = WELL_KNOWN_PROTOS,
outs = [
- "wellknown.srcjar"
+ "wellknown.srcjar",
],
cmd = "$(location :protoc) --java_out=$(@D)/wellknown.jar" +
- " -Ithird_party/protobuf/src $(SRCS) " +
- " && mv $(@D)/wellknown.jar $(@D)/wellknown.srcjar",
+ " -Ithird_party/protobuf/src $(SRCS) " +
+ " && mv $(@D)/wellknown.jar $(@D)/wellknown.srcjar",
tools = [":protoc"],
)
@@ -543,7 +549,7 @@
include = "python",
)
-'''
+"""
cc_binary(
name = "internal/_api_implementation.so",
srcs = ["python/google/protobuf/internal/api_implementation.cc"],
@@ -580,7 +586,7 @@
":use_fast_cpp_protos": ["//third_party/protobuf/util/python:python_headers"],
}),
)
-'''
+"""
config_setting(
name = "use_fast_cpp_protos",