Fix the Bazel build.

1. Fix the path to eigen, now that it uses gitlab instead of bitbucket.
2. Remove an unrecognized compiler option.
3. Remove an obsolete benchmark.

This CL only unbreaks the build, it is likely that it is still not
at par with the cmake build.

https://github.com/ceres-solver/ceres-solver/issues/628

Change-Id: I470209cbb48b6a4f499564a86b52436e0c8d98ef
diff --git a/BUILD b/BUILD
index 2d0a5f0..5e04e03 100644
--- a/BUILD
+++ b/BUILD
@@ -164,14 +164,13 @@
     # trigger incorrectly on parts of rotation_test. For now, disable them,
     # but in the future disable these warnings only for rotation_test.
     # TODO(keir): When the tests are macro-ified, apply these selectively.
-    "-Wno-nonnull-compare",
     "-Wno-address",
 ]
 
 TEST_DEPS = [
     "//:ceres",
     "//:test_util",
-    "@com_github_eigen_eigen//:eigen",
+    "@com_gitlab_libeigen_eigen//:eigen",
     "@com_github_gflags_gflags//:gflags",
 ]
 
@@ -210,7 +209,6 @@
     copts = TEST_COPTS,
     deps = TEST_DEPS + ["@com_github_google_benchmark//:benchmark"],
 ) for benchmark_name in [
-    "autodiff_cost_function_benchmark",
     "small_blas_gemm_benchmark",
     "small_blas_gemv_benchmark",
 ]]
diff --git a/WORKSPACE b/WORKSPACE
index 7264bed..e1e5eca 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -57,11 +57,11 @@
 
 # External dependency: Eigen; has no Bazel build.
 http_archive(
-    name = "com_github_eigen_eigen",
-    sha256 = "dd254beb0bafc695d0f62ae1a222ff85b52dbaa3a16f76e781dce22d0d20a4a6",
-    strip_prefix = "eigen-eigen-5a0156e40feb",
+    name = "com_gitlab_libeigen_eigen",
+    sha256 = "0215c6593c4ee9f1f7f28238c4e8995584ebf3b556e9dbf933d84feb98d5b9ef",
+    strip_prefix = "eigen-3.3.8",
     urls = [
-        "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2",
+        "https://gitlab.com/libeigen/eigen/-/archive/3.3.8/eigen-3.3.8.tar.bz2",
     ],
     build_file_content =
 """
diff --git a/bazel/ceres.bzl b/bazel/ceres.bzl
index 9f12f1b..ce170b2 100644
--- a/bazel/ceres.bzl
+++ b/bazel/ceres.bzl
@@ -204,7 +204,7 @@
         ],
         visibility = ["//visibility:public"],
         deps = [
-            "@com_github_eigen_eigen//:eigen",
+            "@com_gitlab_libeigen_eigen//:eigen",
             "@com_github_google_glog//:glog",
         ],
     )