Merge "Moved 2014 drivetrain code into y2014 namespace."
diff --git a/NO_BUILD_AMD64 b/NO_BUILD_AMD64
new file mode 100644
index 0000000..bfc83b1
--- /dev/null
+++ b/NO_BUILD_AMD64
@@ -0,0 +1,11 @@
+-//aos/externals:wpilib
+-//aos/externals:wpilib_2015
+-//frc971/wpilib/...
+-//y2014/wpilib/...
+-//y2014:download
+-//y2014_bot3/wpilib/...
+-//y2014_bot3:download
+-//y2015/wpilib/...
+-//y2015:download
+-//y2015_bot3/wpilib/...
+-//y2015_bot3:download
diff --git a/NO_BUILD_ROBORIO b/NO_BUILD_ROBORIO
new file mode 100644
index 0000000..7d3ca3d
--- /dev/null
+++ b/NO_BUILD_ROBORIO
@@ -0,0 +1,3 @@
+-@slycot_repo//...
+-//y2014/control_loops/python/...
+-//frc971/control_loops/python/...
diff --git a/README.md b/README.md
index 1801d60..6e69995 100644
--- a/README.md
+++ b/README.md
@@ -36,9 +36,10 @@
Some useful Bazel commands:
* Build and test everything (on the host system):
```console
-bazel test //...
+bazel test //... -- $(cat NO_BUILD_AMD64)
+bazel build --cpu=roborio //... -- $(cat NO_BUILD_ROBORIO)
```
- This currently requires adding `-//{y2014,y2015,bot3,frc971}/wpilib/... -//aos/externals:wpilib` to avoid trying to build WPILib to work.
+ The NO_BUILD_{AMD64,ROBORIO} files contain lists of the targets which are intentionally not built for the various CPUs.
* Build the code for a specific robot:
```console
bazel build --cpu=roborio --compilation_mode=opt //y2015/...
diff --git a/WORKSPACE b/WORKSPACE
index 43ee6e5..221437a 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -16,28 +16,6 @@
actual = '@slycot_repo//:slycot',
)
-# TODO(brian): Make these point to something which isn't hard-coded to come off
-# the host system...
-bind(
- name = 'librt',
- actual = '@usr_repo//:librt',
-)
-
-bind(
- name = 'libdl',
- actual = '@usr_repo//:libdl',
-)
-
-bind(
- name = 'libm',
- actual = '@usr_repo//:libm',
-)
-
-bind(
- name = 'libpthread',
- actual = '@usr_repo//:libpthread',
-)
-
new_http_archive(
name = 'arm-frc-linux-gnueabi-repo',
build_file = 'tools/cpp/arm-frc-linux-gnueabi/arm-frc-linux-gnueabi.BUILD',
diff --git a/aos/downloader/downloader.bzl b/aos/downloader/downloader.bzl
index dff198a..51d6916 100644
--- a/aos/downloader/downloader.bzl
+++ b/aos/downloader/downloader.bzl
@@ -30,8 +30,11 @@
Running this with `bazel run` will actually download everything.
+This also generates a start_list.txt file with the names of binaries to start.
+
Attrs:
srcs: The files to download. They currently all get shoved into one folder.
+ start_srcs: Like srcs, except they also get put into start_list.txt.
default_target: The default host to download to. If not specified, defaults to
roboRIO-971.local.
'''
diff --git a/build_tests/tcmalloc.cc b/build_tests/tcmalloc.cc
index 323ee58..eb74a65 100644
--- a/build_tests/tcmalloc.cc
+++ b/build_tests/tcmalloc.cc
@@ -1,3 +1,3 @@
#include <stdlib.h>
-int main() { malloc(500000); }
+int main() { void *big_chunk __attribute__((unused)) = malloc(500000); }
diff --git a/third_party/gperftools/BUILD b/third_party/gperftools/BUILD
index 51953b4..65d9b1b 100644
--- a/third_party/gperftools/BUILD
+++ b/third_party/gperftools/BUILD
@@ -231,7 +231,7 @@
':tcmalloc',
],
copts = common_copts,
- size = 'small',
+ size = 'medium',
)
cc_test(
diff --git a/tools/build_rules/fortran.bzl b/tools/build_rules/fortran.bzl
index ed586f7..c67884a 100644
--- a/tools/build_rules/fortran.bzl
+++ b/tools/build_rules/fortran.bzl
@@ -22,7 +22,8 @@
'-fmacro-backtrace-limit=0']
for flag in cmd:
- if flag not in exclude_flags:
+ if flag not in exclude_flags and not (flag.startswith('-fsanitize') or
+ flag.startswith('-fno-sanitize')):
filtered_cmd.append(flag)
ctx.action(
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index f6203eb..535ab0a 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -36,8 +36,6 @@
filegroup(
name = 'toolchain',
srcs = [
- ':cc-compiler-armeabi-v7a',
- ':cc-compiler-local',
':cc-compiler-k8',
':cc-compiler-roborio',
'@arm-frc-linux-gnueabi-repo//:compiler_components',
@@ -46,34 +44,6 @@
)
cc_toolchain(
- name = 'cc-compiler-local',
- all_files = ':empty',
- compiler_files = ':empty',
- cpu = 'local',
- dwp_files = ':empty',
- dynamic_runtime_libs = [':empty'],
- linker_files = ':empty',
- objcopy_files = ':empty',
- static_runtime_libs = [':empty'],
- strip_files = ':empty',
- supports_param_files = 1,
-)
-
-cc_toolchain(
- name = 'cc-compiler-armeabi-v7a',
- all_files = ':empty',
- compiler_files = ':empty',
- cpu = 'local',
- dwp_files = ':empty',
- dynamic_runtime_libs = [':empty'],
- linker_files = ':empty',
- objcopy_files = ':empty',
- static_runtime_libs = [':empty'],
- strip_files = ':empty',
- supports_param_files = 1,
-)
-
-cc_toolchain(
name = 'cc-compiler-k8',
all_files = ':empty',
compiler_files = ':empty',
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL
index d159e5d..d76637c 100644
--- a/tools/cpp/CROSSTOOL
+++ b/tools/cpp/CROSSTOOL
@@ -255,11 +255,9 @@
linker_flag: "-Wl,--warn-execstack"
linker_flag: "-Wl,--detect-odr-violations"
- compilation_mode_flags {
- mode: DBG
- # Enable debug symbols.
- compiler_flag: "-ggdb3"
- }
+ # Enable debug symbols.
+ compiler_flag: "-ggdb3"
+
compilation_mode_flags {
mode: OPT
@@ -508,11 +506,9 @@
#linker_flag: "-Wl,--warn-execstack"
#linker_flag: "-Wl,--detect-odr-violations"
- compilation_mode_flags {
- mode: DBG
- # Enable debug symbols.
- compiler_flag: "-ggdb3"
- }
+ # Enable debug symbols.
+ compiler_flag: "-ggdb3"
+
compilation_mode_flags {
mode: OPT