refactor: change defined(MAS_BUILD) to IS_MAS_BUILD() (#36332)
* refactor: change defined(MAS_BUILD) to IS_MAS_BUILD() This is missing-definition safe and thus allows us to move the definition of this macro away from "all compilation targets" to "just the compilation targets that depend on this macro". In turn this makes the rebuild time changing from mas <-> darwin only 80 seconds on my machine, instead of the 12-15 minutes it used to take. This will also allow us in the future to build both MAS and darwin on the same CI machine. Costing us ~2 minutes on one machine but saving us anywhere from 30 minutes to an hour of CI time on other parts of the matrix. * build: always define IS_MAS_BUILD even on non-mac builds * build: use extra_configs
This commit is contained in:
parent
d8bb172318
commit
a9ef68f126
30 changed files with 455 additions and 167 deletions
|
@ -7,14 +7,14 @@ Guard usages in chromium code of private Mac APIs by MAS_BUILD, so they can
|
|||
be excluded for people who want to submit their apps to the Mac App store.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/editing/kill_ring_mac.mm b/third_party/blink/renderer/core/editing/kill_ring_mac.mm
|
||||
index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d33e833a8 100644
|
||||
index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..78e4e0fe20e0fdfeab18b28fe208d5aa38eb0bd1 100644
|
||||
--- a/third_party/blink/renderer/core/editing/kill_ring_mac.mm
|
||||
+++ b/third_party/blink/renderer/core/editing/kill_ring_mac.mm
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
namespace blink {
|
||||
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
extern "C" {
|
||||
|
||||
// Kill ring calls. Would be better to use NSKillRing.h, but that's not
|
||||
|
@ -28,7 +28,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
|
|||
static bool initialized_kill_ring = false;
|
||||
if (!initialized_kill_ring) {
|
||||
initialized_kill_ring = true;
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
_NSInitializeKillRing();
|
||||
+#endif
|
||||
}
|
||||
|
@ -36,21 +36,21 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
|
|||
|
||||
void KillRing::Append(const String& string) {
|
||||
InitializeKillRingIfNeeded();
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
_NSAppendToKillRing(string);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void KillRing::Prepend(const String& string) {
|
||||
InitializeKillRingIfNeeded();
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
_NSPrependToKillRing(string);
|
||||
+#endif
|
||||
}
|
||||
|
||||
String KillRing::Yank() {
|
||||
InitializeKillRingIfNeeded();
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
return _NSYankFromKillRing();
|
||||
+#else
|
||||
+ return "";
|
||||
|
@ -59,14 +59,14 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
|
|||
|
||||
void KillRing::StartNewSequence() {
|
||||
InitializeKillRingIfNeeded();
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
_NSNewKillRingSequence();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void KillRing::SetToYankedState() {
|
||||
InitializeKillRingIfNeeded();
|
||||
+#ifndef MAS_BUILD
|
||||
+#if !IS_MAS_BUILD()
|
||||
_NSSetKillRingToYankedState();
|
||||
+#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue