|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Austin Schuh < [email protected]> |
| 3 | +Date: Sat, 9 Aug 2025 12:45:23 -0700 |
| 4 | +Subject: [PATCH 3/3] Add build files from bzlmod for eigen |
| 5 | + |
| 6 | +This makes it so our vendored version of eigen matches the same API as |
| 7 | +the upstream eigen in bcr. |
| 8 | +--- |
| 9 | + BUILD.bazel | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 10 | + WORKSPACE | 0 |
| 11 | + 2 files changed, 64 insertions(+) |
| 12 | + create mode 100644 BUILD.bazel |
| 13 | + create mode 100644 WORKSPACE |
| 14 | + |
| 15 | +diff --git a/BUILD.bazel b/BUILD.bazel |
| 16 | +new file mode 100644 |
| 17 | +index 0000000000000000000000000000000000000000..38ce6cb417485fb37cafaf1e0f536e7ac56706b0 |
| 18 | +--- /dev/null |
| 19 | ++++ b/BUILD.bazel |
| 20 | +@@ -0,0 +1,64 @@ |
| 21 | ++load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| 22 | ++load("@rules_license//rules:license.bzl", "license") |
| 23 | ++ |
| 24 | ++package( |
| 25 | ++ default_applicable_licenses = [ |
| 26 | ++ ":license.APACHE", |
| 27 | ++ ":license.BSD", |
| 28 | ++ ":license.MINPACK", # Only used by unsupported/** not by Eigen/**. |
| 29 | ++ ":license.MPL2", |
| 30 | ++ ], |
| 31 | ++) |
| 32 | ++ |
| 33 | ++exports_files(glob(["COPYING.*"])) |
| 34 | ++ |
| 35 | ++# Note: Eigen is primarily an MPL2 library with small bits of code under other |
| 36 | ++# licenses. Previous versions of Eigen contained LGPL code which needed to be |
| 37 | ++# carefully excluded, but as of approximately 2023-02-07 all LGPL code has been |
| 38 | ++# removed upstream so does not need any special handling here. |
| 39 | ++ |
| 40 | ++license( |
| 41 | ++ name = "license.APACHE", |
| 42 | ++ license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"], |
| 43 | ++ license_text = "COPYING.APACHE", |
| 44 | ++) |
| 45 | ++ |
| 46 | ++license( |
| 47 | ++ name = "license.BSD", |
| 48 | ++ license_kinds = ["@rules_license//licenses/spdx:BSD-3-Clause"], |
| 49 | ++ license_text = "COPYING.BSD", |
| 50 | ++) |
| 51 | ++ |
| 52 | ++license( |
| 53 | ++ name = "license.MINPACK", |
| 54 | ++ license_kinds = ["@rules_license//licenses/spdx:BSD-3-Clause-Attribution"], |
| 55 | ++ license_text = "COPYING.MINPACK", |
| 56 | ++) |
| 57 | ++ |
| 58 | ++license( |
| 59 | ++ name = "license.MPL2", |
| 60 | ++ license_kinds = ["@rules_license//licenses/spdx:MPL-2.0"], |
| 61 | ++ license_text = "COPYING.MPL2", |
| 62 | ++) |
| 63 | ++ |
| 64 | ++HDRS = glob( |
| 65 | ++ [ |
| 66 | ++ "Eigen/**", |
| 67 | ++ "unsupported/Eigen/**", |
| 68 | ++ ], |
| 69 | ++ exclude = [ |
| 70 | ++ # We don't want any documentation files. |
| 71 | ++ "**/*.md", |
| 72 | ++ "**/*.txt", |
| 73 | ++ "unsupported/Eigen/NonLinearOptimization", |
| 74 | ++ #"unsupported/Eigen/MatrixFunctions", |
| 75 | ++ "unsupported/Eigen/Polynomials", |
| 76 | ++ ], |
| 77 | ++) |
| 78 | ++ |
| 79 | ++cc_library( |
| 80 | ++ name = "eigen", |
| 81 | ++ hdrs = HDRS, |
| 82 | ++ includes = ["."], |
| 83 | ++ visibility = ["//visibility:public"], |
| 84 | ++) |
| 85 | +diff --git a/WORKSPACE b/WORKSPACE |
| 86 | +new file mode 100644 |
| 87 | +index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 |
0 commit comments