[PATCH] D119547: [libc][bazel] Add tests to the bazel build

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 03:31:31 PST 2022


gchatelet marked 10 inline comments as done.
gchatelet added inline comments.


================
Comment at: utils/bazel/WORKSPACE:90
+# We set register_built_tools to False to prevent building make from source.
+# Building make from source fails because of "-Wall -Werror" (.blazerc).
+rules_foreign_cc_dependencies(register_built_tools = False)
----------------
GMNGeoffrey wrote:
> bazelrc. Note that this is no longer set in the bazelr by default, but it is set in the CI
This is no more relevant, thx for the heads up.
I've added some documentation as well.


================
Comment at: utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel:9-12
+    target_compatible_with = select({
+        "//conditions:default": [],
+        "//libc:libc_math_mpfr_disable": ["//libc:not_compatible"],
+    }),
----------------
GMNGeoffrey wrote:
> It is wild to me that this is how you disable something in Bazel...
This is the recommended way as far as I understand
https://youtu.be/01BHJT7GL9o

Please correct me if I'm wrong!


================
Comment at: utils/bazel/third_party_build/mpfr.BUILD:11
+    toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
+    copts = ["-Wno-error"],  # ./configure crashes with `-Werror`
+    lib_name = "libmpfr",
----------------
GMNGeoffrey wrote:
> GMNGeoffrey wrote:
> > Probably want to turn off all warnings entirely. Getting warnings from this is not going to be useful for anyone. I think `-w` is the flag for both clang and gcc.
> I think that with this you don't need to also turn off `-Werror`. `-w` -> no warnings so it doesn't matter that all warnings are errors :-)
Fair enough 🙂


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119547/new/

https://reviews.llvm.org/D119547



More information about the llvm-commits mailing list