Got basic code building with the roboRIO compiler.
Change-Id: I158caa4786542344e91949c62fd95a79015b653b
diff --git a/third_party/cddlib/BUILD b/third_party/cddlib/BUILD
index d197954..17a7fc4 100644
--- a/third_party/cddlib/BUILD
+++ b/third_party/cddlib/BUILD
@@ -1,5 +1,7 @@
licenses(['notice'])
+load('/tools/build_rules/select', 'compiler_select')
+
cc_library(
name = 'cddlib',
visibility = ['//visibility:public'],
@@ -24,5 +26,8 @@
'-Wno-switch-enum',
'-Wno-empty-body',
'-Wno-sign-compare',
- ],
+ ] + compiler_select({
+ 'gcc': ['-Wno-unused-but-set-variable'],
+ 'clang': []
+ }),
)
diff --git a/third_party/gflags/BUILD b/third_party/gflags/BUILD
index 9642c6f..bad36a9 100644
--- a/third_party/gflags/BUILD
+++ b/third_party/gflags/BUILD
@@ -20,8 +20,9 @@
'-DGFLAGS_DLL_DEFINE_FLAG=',
'-Wno-format-nonliteral',
- '-Wno-unused-local-typedef',
+ '-Wno-unused-local-typedefs',
'-Wno-sign-compare',
+ '-Wno-missing-field-initializers',
]
cc_library(
diff --git a/third_party/googletest/BUILD b/third_party/googletest/BUILD
index 861ce5d..b76b35b 100644
--- a/third_party/googletest/BUILD
+++ b/third_party/googletest/BUILD
@@ -325,6 +325,9 @@
deps = [
":googletest_main",
],
+ copts = [
+ "-Wno-empty-body",
+ ]
)
cc_test(
@@ -390,6 +393,10 @@
deps = [
":googletest_main",
],
+ copts = [
+ "-Wno-empty-body",
+ "-Wno-missing-field-initializers",
+ ]
)
cc_test(
diff --git a/third_party/libevent/BUILD b/third_party/libevent/BUILD
index 50f714a..b576f52 100644
--- a/third_party/libevent/BUILD
+++ b/third_party/libevent/BUILD
@@ -1,5 +1,7 @@
licenses(['notice'])
+load('/tools/build_rules/select', 'compiler_select')
+
cc_library(
name = 'libevent',
visibility = ['//visibility:public'],
@@ -56,7 +58,9 @@
'-Wno-unused-parameter',
'-Wno-format-nonliteral',
'-Wno-cast-qual',
- '-Wno-incompatible-pointer-types-discards-qualifiers',
'-Wno-unused-function',
- ],
+ ] + compiler_select({
+ 'gcc': [],
+ 'clang': ['-Wno-incompatible-pointer-types-discards-qualifiers']
+ }),
)
diff --git a/third_party/libevent/buffer.c b/third_party/libevent/buffer.c
index 80a9e1b..de4ab52 100644
--- a/third_party/libevent/buffer.c
+++ b/third_party/libevent/buffer.c
@@ -2749,7 +2749,7 @@
if (!chain)
return (-1);
chain->flags |= EVBUFFER_REFERENCE | EVBUFFER_IMMUTABLE;
- chain->buffer = (const u_char *)data;
+ chain->buffer = (u_char *)data;
chain->buffer_len = datlen;
chain->off = datlen;
diff --git a/third_party/seasocks/BUILD b/third_party/seasocks/BUILD
index 9dc7c61..d85e3c3 100644
--- a/third_party/seasocks/BUILD
+++ b/third_party/seasocks/BUILD
@@ -13,6 +13,7 @@
copts = [
# TODO(Brian): Don't apply this to all of the code...
'-Wno-cast-align',
+ '-Wno-cast-qual',
'-Wno-switch-enum',
'-Wno-format-nonliteral',