b/ci: update build container to Fedora 35
Fedora 32 is EOL since over half a year, update to the current stable
Fedora release.
toolchains: adds clang as it's no longer part of the llvm package,
changes toolchain path references to GCC 11, and rebuilds the sysroot.
edk2: update to latest stable (old version cannot build with a newer
minor version of Python 3) and patch to disable -Werror and make the
newer included Brotli version work as it natively includes BUILD
files which need to be patched out to make the source files accessible.
linux: add patch to fix PVH ELF note entrypoint with binutils 2.32+ as
otherwise the .notes section gets emitted with broken alignment.
m/t/launch: RunMicroVM is broken if SerialPort is not set with newer
QEMU versions because fcntl(2) fails to interact with a broken file
descriptor. This is due to a confusion between nil interfaces and
interfaces containing a nil pointer causing Go to improperly pass the
file descriptor. Changing the type of SerialPort to the actual
interface resolves the issue.
Change-Id: I03a8cbf4f80a7363794dad1ff62ccb57e778cac3
Reviewed-on: https://review.monogon.dev/c/monogon/+/529
Reviewed-by: Leopold Schabel <leo@nexantic.com>
diff --git a/third_party/edk2/patches/BUILD b/third_party/edk2/patches/BUILD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/third_party/edk2/patches/BUILD
diff --git a/third_party/edk2/patches/disable-werror.patch b/third_party/edk2/patches/disable-werror.patch
new file mode 100644
index 0000000..174b16a
--- /dev/null
+++ b/third_party/edk2/patches/disable-werror.patch
@@ -0,0 +1,137 @@
+From b206ad03bdbe5dab70cd11f2afa54dd06b6074b1 Mon Sep 17 00:00:00 2001
+From: Lorenz Brun <lorenz@monogon.tech>
+Date: Mon, 7 Mar 2022 19:06:11 +0100
+Subject: [PATCH] Disable -Werror as it breaks newer compilers
+
+---
+ BaseTools/Conf/tools_def.template | 18 +++++++++---------
+ BaseTools/Source/C/Makefiles/header.makefile | 6 +++---
+ CryptoPkg/Library/OpensslLib/OpensslLib.inf | 8 ++++----
+ .../Library/OpensslLib/OpensslLibCrypto.inf | 8 ++++----
+ 4 files changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
+index f2bb6247e8..ef1997187c 100755
+--- a/BaseTools/Conf/tools_def.template
++++ b/BaseTools/Conf/tools_def.template
+@@ -1867,7 +1867,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N
+ *_*_*_DTCPP_PATH = DEF(DTCPP_BIN)
+ *_*_*_DTC_PATH = DEF(DTC_BIN)
+
+-DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
++DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Wno-array-bounds -include AutoGen.h -fno-common
+ DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
+ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
+ DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
+@@ -1971,7 +1971,7 @@ DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
+ DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
+ DEFINE GCC5_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -fno-lto
+
+-DEFINE GCC5_RISCV_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -msmall-data-limit=0
++DEFINE GCC5_RISCV_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -msmall-data-limit=0
+ DEFINE GCC5_RISCV_ALL_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
+ DEFINE GCC5_RISCV_ALL_DLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ DEFINE GCC5_RISCV_ALL_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
+@@ -2961,7 +2961,7 @@ NOOPT_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fu
+ ##################
+ # ASL definitions
+ ##################
+-*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
++*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Wno-missing-braces -c -include AutoGen.h
+ *_XCODE5_*_ASLDLINK_FLAGS = -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ *_XCODE5_*_ASLPP_FLAGS = -x c -E -include AutoGen.h
+ *_XCODE5_*_ASL_FLAGS =
+@@ -2989,9 +2989,9 @@ RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
+ *_XCODE5_IA32_NASM_FLAGS = -f macho32
+
+
+- DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
+-RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
+- NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
++ DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
++RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
++ NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
+
+ ##################
+ # X64 definitions
+@@ -3008,9 +3008,9 @@ RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
+ *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
+ *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
+
+- DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
+- NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
+-RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
++ DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -Os -Wall -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
++ NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
++RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
+
+ ####################################################################################
+ #
+diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
+index 0df728f327..49f9706b1d 100644
+--- a/BaseTools/Source/C/Makefiles/header.makefile
++++ b/BaseTools/Source/C/Makefiles/header.makefile
+@@ -82,17 +82,17 @@ BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS)
+
+ ifeq ($(DARWIN),Darwin)
+ # assume clang or clang compatible flags on OS X
+-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall \
+ -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
+ else
+ ifeq ($(CXX), llvm)
+ BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
+--fno-delete-null-pointer-checks -Wall -Werror \
++-fno-delete-null-pointer-checks -Wall \
+ -Wno-deprecated-declarations -Wno-self-assign \
+ -Wno-unused-result -nostdlib -g
+ else
+ BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
+--fno-delete-null-pointer-checks -Wall -Werror \
++-fno-delete-null-pointer-checks -Wall \
+ -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
+ -Wno-unused-result -nostdlib -g
+ endif
+diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+index d84bde056a..0638489866 100644
+--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
++++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+@@ -611,11 +611,11 @@
+ INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
+
+ #
+- # Suppress the following build warnings in openssl so we don't break the build with -Werror
+- # -Werror=maybe-uninitialized: there exist some other paths for which the variable is not initialized.
+- # -Werror=format: Check calls to printf and scanf, etc., to make sure that the arguments supplied have
++ # Suppress the following build warnings in openssl so we don't break the build with
++ # =maybe-uninitialized: there exist some other paths for which the variable is not initialized.
++ # =format: Check calls to printf and scanf, etc., to make sure that the arguments supplied have
+ # types appropriate to the format string specified.
+- # -Werror=unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
++ # =unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
+ #
+ GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
+ GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
+diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+index cdeed0d073..48ed8d23f7 100644
+--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
++++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+@@ -560,11 +560,11 @@
+ INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w
+
+ #
+- # Suppress the following build warnings in openssl so we don't break the build with -Werror
+- # -Werror=maybe-uninitialized: there exist some other paths for which the variable is not initialized.
+- # -Werror=format: Check calls to printf and scanf, etc., to make sure that the arguments supplied have
++ # Suppress the following build warnings in openssl so we don't break the build with
++ # =maybe-uninitialized: there exist some other paths for which the variable is not initialized.
++ # =format: Check calls to printf and scanf, etc., to make sure that the arguments supplied have
+ # types appropriate to the format string specified.
+- # -Werror=unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
++ # =unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
+ #
+ GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
+ GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
+--
+2.25.1
+
diff --git a/third_party/edk2/patches/remove-brotli-build.patch b/third_party/edk2/patches/remove-brotli-build.patch
new file mode 100644
index 0000000..153bcff
--- /dev/null
+++ b/third_party/edk2/patches/remove-brotli-build.patch
@@ -0,0 +1,301 @@
+--- a/BaseTools/Source/C/BrotliCompress/brotli/BUILD
++++ /dev/null
+@@ -1,147 +0,0 @@
+-# Description:
+-# Brotli is a generic-purpose lossless compression algorithm.
+-
+-load(":compiler_config_setting.bzl", "create_msvc_config")
+-
+-package(
+- default_visibility = ["//visibility:public"],
+-)
+-
+-licenses(["notice"]) # MIT
+-
+-exports_files(["LICENSE"])
+-
+-config_setting(
+- name = "darwin",
+- values = {"cpu": "darwin"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "darwin_x86_64",
+- values = {"cpu": "darwin_x86_64"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "windows",
+- values = {"cpu": "x64_windows"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "windows_msvc",
+- values = {"cpu": "x64_windows_msvc"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "windows_msys",
+- values = {"cpu": "x64_windows_msys"},
+- visibility = ["//visibility:public"],
+-)
+-
+-create_msvc_config()
+-
+-STRICT_C_OPTIONS = select({
+- ":msvc": [],
+- "//conditions:default": [
+- "--pedantic-errors",
+- "-Wall",
+- "-Wconversion",
+- "-Werror",
+- "-Wextra",
+- "-Wlong-long",
+- "-Wmissing-declarations",
+- "-Wmissing-prototypes",
+- "-Wno-strict-aliasing",
+- "-Wshadow",
+- "-Wsign-compare",
+- ],
+-})
+-
+-filegroup(
+- name = "public_headers",
+- srcs = glob(["c/include/brotli/*.h"]),
+-)
+-
+-filegroup(
+- name = "common_headers",
+- srcs = glob(["c/common/*.h"]),
+-)
+-
+-filegroup(
+- name = "common_sources",
+- srcs = glob(["c/common/*.c"]),
+-)
+-
+-filegroup(
+- name = "dec_headers",
+- srcs = glob(["c/dec/*.h"]),
+-)
+-
+-filegroup(
+- name = "dec_sources",
+- srcs = glob(["c/dec/*.c"]),
+-)
+-
+-filegroup(
+- name = "enc_headers",
+- srcs = glob(["c/enc/*.h"]),
+-)
+-
+-filegroup(
+- name = "enc_sources",
+- srcs = glob(["c/enc/*.c"]),
+-)
+-
+-cc_library(
+- name = "brotli_inc",
+- hdrs = [":public_headers"],
+- copts = STRICT_C_OPTIONS,
+- strip_include_prefix = "c/include",
+-)
+-
+-cc_library(
+- name = "brotlicommon",
+- srcs = [":common_sources"],
+- hdrs = [":common_headers"],
+- copts = STRICT_C_OPTIONS,
+- deps = [":brotli_inc"],
+-)
+-
+-cc_library(
+- name = "brotlidec",
+- srcs = [":dec_sources"],
+- hdrs = [":dec_headers"],
+- copts = STRICT_C_OPTIONS,
+- deps = [":brotlicommon"],
+-)
+-
+-cc_library(
+- name = "brotlienc",
+- srcs = [":enc_sources"],
+- hdrs = [":enc_headers"],
+- copts = STRICT_C_OPTIONS,
+- linkopts = select({
+- ":msvc": [],
+- "//conditions:default": ["-lm"],
+- }),
+- deps = [":brotlicommon"],
+-)
+-
+-cc_binary(
+- name = "brotli",
+- srcs = ["c/tools/brotli.c"],
+- copts = STRICT_C_OPTIONS,
+- linkstatic = 1,
+- deps = [
+- ":brotlidec",
+- ":brotlienc",
+- ],
+-)
+-
+-filegroup(
+- name = "dictionary",
+- srcs = ["c/common/dictionary.bin"],
+-)
+
+--- a/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/BUILD
++++ /dev/null
+@@ -1,147 +0,0 @@
+-# Description:
+-# Brotli is a generic-purpose lossless compression algorithm.
+-
+-load(":compiler_config_setting.bzl", "create_msvc_config")
+-
+-package(
+- default_visibility = ["//visibility:public"],
+-)
+-
+-licenses(["notice"]) # MIT
+-
+-exports_files(["LICENSE"])
+-
+-config_setting(
+- name = "darwin",
+- values = {"cpu": "darwin"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "darwin_x86_64",
+- values = {"cpu": "darwin_x86_64"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "windows",
+- values = {"cpu": "x64_windows"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "windows_msvc",
+- values = {"cpu": "x64_windows_msvc"},
+- visibility = ["//visibility:public"],
+-)
+-
+-config_setting(
+- name = "windows_msys",
+- values = {"cpu": "x64_windows_msys"},
+- visibility = ["//visibility:public"],
+-)
+-
+-create_msvc_config()
+-
+-STRICT_C_OPTIONS = select({
+- ":msvc": [],
+- "//conditions:default": [
+- "--pedantic-errors",
+- "-Wall",
+- "-Wconversion",
+- "-Werror",
+- "-Wextra",
+- "-Wlong-long",
+- "-Wmissing-declarations",
+- "-Wmissing-prototypes",
+- "-Wno-strict-aliasing",
+- "-Wshadow",
+- "-Wsign-compare",
+- ],
+-})
+-
+-filegroup(
+- name = "public_headers",
+- srcs = glob(["c/include/brotli/*.h"]),
+-)
+-
+-filegroup(
+- name = "common_headers",
+- srcs = glob(["c/common/*.h"]),
+-)
+-
+-filegroup(
+- name = "common_sources",
+- srcs = glob(["c/common/*.c"]),
+-)
+-
+-filegroup(
+- name = "dec_headers",
+- srcs = glob(["c/dec/*.h"]),
+-)
+-
+-filegroup(
+- name = "dec_sources",
+- srcs = glob(["c/dec/*.c"]),
+-)
+-
+-filegroup(
+- name = "enc_headers",
+- srcs = glob(["c/enc/*.h"]),
+-)
+-
+-filegroup(
+- name = "enc_sources",
+- srcs = glob(["c/enc/*.c"]),
+-)
+-
+-cc_library(
+- name = "brotli_inc",
+- hdrs = [":public_headers"],
+- copts = STRICT_C_OPTIONS,
+- strip_include_prefix = "c/include",
+-)
+-
+-cc_library(
+- name = "brotlicommon",
+- srcs = [":common_sources"],
+- hdrs = [":common_headers"],
+- copts = STRICT_C_OPTIONS,
+- deps = [":brotli_inc"],
+-)
+-
+-cc_library(
+- name = "brotlidec",
+- srcs = [":dec_sources"],
+- hdrs = [":dec_headers"],
+- copts = STRICT_C_OPTIONS,
+- deps = [":brotlicommon"],
+-)
+-
+-cc_library(
+- name = "brotlienc",
+- srcs = [":enc_sources"],
+- hdrs = [":enc_headers"],
+- copts = STRICT_C_OPTIONS,
+- linkopts = select({
+- ":msvc": [],
+- "//conditions:default": ["-lm"],
+- }),
+- deps = [":brotlicommon"],
+-)
+-
+-cc_binary(
+- name = "brotli",
+- srcs = ["c/tools/brotli.c"],
+- copts = STRICT_C_OPTIONS,
+- linkstatic = 1,
+- deps = [
+- ":brotlidec",
+- ":brotlienc",
+- ],
+-)
+-
+-filegroup(
+- name = "dictionary",
+- srcs = ["c/common/dictionary.bin"],
+-)