Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos: Allow compiling on catalina to ventura #276

Merged
merged 1 commit into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ git_repository(
"//:patches/v8/0003-Make-icudata-target-public.patch",
"//:patches/v8/0004-Add-ArrayBuffer-MaybeNew.patch",
"//:patches/v8/0005-Revert-bazel-Add-hide-symbols-from-release-fast-buil.patch",
"//:patches/v8/0006-bazel-Allow-compiling-on-macOS-catalina-and-ventura.patch",
],
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 79e1d8e03c54f2b1fa1795ad5383fb0c7a94e742 Mon Sep 17 00:00:00 2001
From: Dhi Aurrahman <dio@rockybars.com>
Date: Thu, 27 Oct 2022 12:45:05 +0700
Subject: [PATCH] [bazel] Allow compiling on macOS catalina and ventura

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
---
bazel/defs.bzl | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/bazel/defs.bzl b/bazel/defs.bzl
index e957c0fad3..b557471eba 100644
--- a/bazel/defs.bzl
+++ b/bazel/defs.bzl
@@ -151,6 +151,18 @@ def _default_args():
"-fno-integrated-as",
],
"//conditions:default": [],
+ }) + select({
+ "@v8//bazel/config:is_macos": [
+ # The clang available on macOS Catalina has a warning that isn't clean on v8 code.
+ # The warning doesn't show up with more recent clangs, so disable it for now.
+ "-Wno-range-loop-analysis",
+
+ # To supress warning on deprecated declaration on v8 code:
+ # src/base/platform/platform-darwin.cc:56:22:
+ # 'getsectdatafromheader_64' is deprecated: first deprecated in macOS 13.0.
+ "-Wno-deprecated-declarations",
+ ],
+ "//conditions:default": [],
}),
includes = ["include"],
linkopts = select({
--
2.39.0