blob: 9453b707ef0ecf4275aab40c73ab9aea799d5995 [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexander Khabarov <alexander.khabarov@arm.com>
Date: Thu, 19 Oct 2023 15:07:57 +0000
Subject: [PATCH] Disable `zlib`, `zstd`, `mpfr` and `pfm`
`zlib`, `zstd`, `mpfr` and `pfm` are optional dependencies.
---
libc/BUILD.bazel | 2 +-
lld/BUILD.bazel | 4 ++--
llvm/BUILD.bazel | 12 +++---------
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/libc/BUILD.bazel b/libc/BUILD.bazel
index 0ee339526..51676d039 100644
--- a/libc/BUILD.bazel
+++ b/libc/BUILD.bazel
@@ -39,7 +39,7 @@ MEMORY_COPTS = [
# Flag documentation: https://bazel.build/extending/config
string_flag(
name = "mpfr",
- build_setting_default = "external",
+ build_setting_default = "disable",
values = [
"disable", # Skip tests that need mpfr
"external", # Build mpfr from source
diff --git a/lld/BUILD.bazel b/lld/BUILD.bazel
index fb6e2397c..2cb2fab44 100644
--- a/lld/BUILD.bazel
+++ b/lld/BUILD.bazel
@@ -108,8 +108,8 @@ cc_library(
"//llvm:TargetParser",
"//llvm:TransformUtils",
"//llvm:config",
- "@llvm_zlib//:zlib",
- "@llvm_zstd//:zstd",
+ # "@llvm_zlib//:zlib",
+ # "@llvm_zstd//:zstd",
],
)
diff --git a/llvm/BUILD.bazel b/llvm/BUILD.bazel
index ef5299138..836d4049e 100644
--- a/llvm/BUILD.bazel
+++ b/llvm/BUILD.bazel
@@ -291,14 +291,8 @@ cc_library(
deps = [
":config",
":Demangle",
- # We unconditionally depend on the custom LLVM zlib wrapper. This will
- # be an empty library unless zlib is enabled, in which case it will
- # both provide the necessary dependencies and configuration defines.
- "@llvm_zlib//:zlib",
- # We unconditionally depend on the custom LLVM zstd wrapper. This will
- # be an empty library unless zstd is enabled, in which case it will
- # both provide the necessary dependencies and configuration defines.
- "@llvm_zstd//:zstd",
+ # "@llvm_zlib//:zlib",
+ # "@llvm_zstd//:zstd",
],
)
@@ -2959,7 +2953,7 @@ cc_library(
# Flag documentation: https://bazel.build/extending/config
string_flag(
name = "pfm",
- build_setting_default = "external",
+ build_setting_default = "disable",
values = [
"disable", # Don't include pfm at all
"external", # Build pfm from source