[llvm] Fix csmith build on macOS.
@@ -16,5 +16,15 @@ filegroup(
configure_make(
name = "csmith",
binaries = ["csmith"],
+ configure_env_vars = {
+ # Workaround error with libtool usage on macOS. See:
+ # https://github.com/bazelbuild/rules_foreign_cc/issues/185
+ "AR": "/usr/bin/ar",
+ # Csmith uses decreated stdlib functions like std::bind2nd().
+ "CXXFLAGS": "-D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES",
+ },
+ # Workaround a strange bug where the srand48_deterministic test returns
+ # true on macOS, although this only available and needed for OpenBSD.
+ configure_options = ["ac_cv_func_srand48_deterministic=no"],
lib_source = "@csmith//:all",
)
